mirror of https://github.com/OrbTools/OrbMap
Refactor in orbcommon
parent
2d99f7f889
commit
84e9a1664b
@ -1,55 +0,0 @@
|
||||
package box
|
||||
|
||||
type embedBox struct {
|
||||
storage map[string][]byte
|
||||
}
|
||||
|
||||
// Create new box for embed files
|
||||
func newEmbedBox() *embedBox {
|
||||
return &embedBox{storage: make(map[string][]byte)}
|
||||
}
|
||||
|
||||
// Add a file to box
|
||||
func (e *embedBox) Add(file string, content []byte) {
|
||||
e.storage[file] = content
|
||||
}
|
||||
|
||||
// Get file's content
|
||||
func (e *embedBox) Get(file string) []byte {
|
||||
if f, ok := e.storage[file]; ok {
|
||||
return f
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *embedBox) List() []string {
|
||||
keys := make([]string, 0)
|
||||
for k := range e.storage {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
return keys
|
||||
}
|
||||
|
||||
// Embed box expose
|
||||
var box = newEmbedBox()
|
||||
|
||||
// Add a file content to box
|
||||
func Add(file string, content []byte) {
|
||||
box.Add(file, content)
|
||||
}
|
||||
|
||||
// Get a file from box
|
||||
func Get(file string) []byte {
|
||||
return box.Get(file)
|
||||
}
|
||||
|
||||
// Lists files in box
|
||||
func List() []string {
|
||||
return box.List()
|
||||
}
|
||||
|
||||
// Code generated by go generate; DO NOT EDIT.
|
||||
|
||||
func init() {
|
||||
box.Add("orbweaver.dev", []byte{41, 2, 3, 4, 5, 15, 16, 17, 18, 19, 58, 30, 31, 32, 33, 42, 44, 45, 46, 47, 56, 103, 106, 108, 105, 57})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
package common
|
||||
|
||||
var KEYCODE_WINDOWS_FROM_HID = [256]byte{
|
||||
255, 255, 255, 255, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38, 50, 49, 24, 25, 16, 19, 31, 20,
|
||||
22, 47, 17, 45, 21, 44, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 255, 1, 14, 15, 255, 12, 13, 26, 27, 43, 255,
|
||||
39, 40, 41, 51, 52, 53, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 87, 88, 183, 70, 69, 210, 199,
|
||||
201, 211, 207, 209, 205, 203, 208, 200, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 28, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 29, 42, 56,
|
||||
219, 157, 54, 184, 220, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255}
|
Loading…
Reference in New Issue