|
|
|
@ -9,6 +9,8 @@ import (
|
|
|
|
|
"runtime"
|
|
|
|
|
"strconv"
|
|
|
|
|
"strings"
|
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
//Round rundet Zahlen
|
|
|
|
@ -184,23 +186,7 @@ func SliceContainsString(haystack []string, needle string) int {
|
|
|
|
|
return -1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Difference of two []string-Slices
|
|
|
|
|
|
|
|
|
|
// Set Difference: A - B
|
|
|
|
|
func StringsDiff(a, b []string) (diff []string) {
|
|
|
|
|
m := make(map[string]bool)
|
|
|
|
|
|
|
|
|
|
for _, item := range b {
|
|
|
|
|
m[item] = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for _, item := range a {
|
|
|
|
|
if _, ok := m[item]; !ok {
|
|
|
|
|
diff = append(diff, item)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Dank an https://programming.guide/go/formatting-byte-size-to-human-readable-format.html
|
|
|
|
|
func ByteCountDecimal(b int64) string {
|
|
|
|
|