Adds a first version of a new obidistribute command

This commit is contained in:
2022-02-14 00:01:01 +01:00
parent 1544bafde1
commit eb32620bb3
13 changed files with 567 additions and 36 deletions

View File

@@ -54,6 +54,18 @@ func InterfaceToInt(i interface{}) (val int, err error) {
return
}
func IsAnInt(i interface{}) bool {
switch i.(type) {
case int,
int8, int16, int32, int64,
uint8, uint16, uint32, uint64:
return true
default:
return false
}
}
// CopyMap makes a deep copy of a map[string]interface{}.
func CopyMap(dest, src map[string]interface{}) {
buf := new(bytes.Buffer)