Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
68f6576663
|
|||
9c4d3c851c
|
@ -24,7 +24,8 @@ func GenerateNewSHA256Sum() string {
|
|||||||
[]string{
|
[]string{
|
||||||
fmt.Sprintf("%d", prime),
|
fmt.Sprintf("%d", prime),
|
||||||
GenerateNewUUID(),
|
GenerateNewUUID(),
|
||||||
timestamp},
|
timestamp,
|
||||||
|
},
|
||||||
"|",
|
"|",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
12
strings.go
12
strings.go
@ -6,6 +6,18 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// BuildWhitelistForStringSanitisation transfroms a slice of whitelisted substrings into a hashtable
|
||||||
|
func BuildWhitelistForStringSanitisation(wl []string) map[string]string {
|
||||||
|
whitelist := map[string]string{}
|
||||||
|
|
||||||
|
for _, c := range wl {
|
||||||
|
whitelist[c] = c
|
||||||
|
}
|
||||||
|
|
||||||
|
return whitelist
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// FirstCharacterToUppercase converts the first character of a string to uppercase
|
// FirstCharacterToUppercase converts the first character of a string to uppercase
|
||||||
func FirstCharacterToUppercase(s string) string {
|
func FirstCharacterToUppercase(s string) string {
|
||||||
if len(s) == 0 {
|
if len(s) == 0 {
|
||||||
|
Reference in New Issue
Block a user