Add a first version of obitag the successor of ecotag

This commit is contained in:
2022-10-26 13:16:56 +02:00
parent e17d1fbca6
commit 8aa323dad5
17 changed files with 884 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ import (
"bufio"
"bytes"
"encoding/json"
"fmt"
"io"
"os"
"reflect"
@@ -12,6 +13,15 @@ import (
"github.com/barkimedes/go-deepcopy"
)
// InterfaceToInt converts a interface{} to an integer value if possible.
// If not a "NotAnInteger" error is returned via the err
// return value and val is set to 0.
func InterfaceToString(i interface{}) (val string, err error) {
err = nil
val = fmt.Sprintf("%V", i)
return
}
// NotAnInteger defines a new type of Error : "NotAnInteger"
type NotAnInteger struct {
message string