summaryrefslogtreecommitdiffstats
path: root/modules/util/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/util/util.go')
-rw-r--r--modules/util/util.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/modules/util/util.go b/modules/util/util.go
index 782b905bec..148817bd47 100644
--- a/modules/util/util.go
+++ b/modules/util/util.go
@@ -6,7 +6,6 @@ package util
import (
"bytes"
"crypto/rand"
- "errors"
"fmt"
"math/big"
"strconv"
@@ -117,29 +116,6 @@ func NormalizeEOL(input []byte) []byte {
return tmp[:pos]
}
-// MergeInto merges pairs of values into a "dict"
-func MergeInto(dict map[string]interface{}, values ...interface{}) (map[string]interface{}, error) {
- for i := 0; i < len(values); i++ {
- switch key := values[i].(type) {
- case string:
- i++
- if i == len(values) {
- return nil, errors.New("specify the key for non array values")
- }
- dict[key] = values[i]
- case map[string]interface{}:
- m := values[i].(map[string]interface{})
- for i, v := range m {
- dict[i] = v
- }
- default:
- return nil, errors.New("dict values must be maps")
- }
- }
-
- return dict, nil
-}
-
// CryptoRandomInt returns a crypto random integer between 0 and limit, inclusive
func CryptoRandomInt(limit int64) (int64, error) {
rInt, err := rand.Int(rand.Reader, big.NewInt(limit))