Big refactor

This commit is contained in:
2022-08-18 17:08:05 +02:00
parent 0520e7641f
commit 92cee16cc8
56 changed files with 475 additions and 293 deletions
-1
View File
@@ -1 +0,0 @@
package util
+3 -3
View File
@@ -1,10 +1,10 @@
package util
// H is a shortcut for creating a json-like object
type H map[string]interface{}
// Map is a shortcut for creating a json-like object
type Map map[string]interface{}
// Apply is like Object.apply from JS and merges the given objects on top of target
func (target H) Apply(sources ...H) H {
func (target Map) Apply(sources ...Map) Map {
for _, source := range sources {
for k, v := range source {
target[k] = v
+1
View File
@@ -6,6 +6,7 @@ import (
"log"
)
// GenerateRandomString generates a random base64 string from a random array of "n" bytes (to prevent padding let n be a multiple of 3)
func GenerateRandomString(n int) string {
b := make([]byte, n)