diff options
Diffstat (limited to 'util.go')
-rw-r--r-- | util.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -4,6 +4,7 @@ import ( | |||
4 | "crypto/sha256" | 4 | "crypto/sha256" |
5 | "encoding/hex" | 5 | "encoding/hex" |
6 | "net/url" | 6 | "net/url" |
7 | "strconv" | ||
7 | "strings" | 8 | "strings" |
8 | ) | 9 | ) |
9 | 10 | ||
@@ -59,3 +60,7 @@ func Sha256Hex(v string) string { | |||
59 | s256.Write([]byte(v)) | 60 | s256.Write([]byte(v)) |
60 | return hex.EncodeToString(s256.Sum(nil)) | 61 | return hex.EncodeToString(s256.Sum(nil)) |
61 | } | 62 | } |
63 | |||
64 | func StringListFromInt(i int64) []string { | ||
65 | return []string{strconv.FormatInt(i, 10)} | ||
66 | } | ||