MCPcopy Create free account
hub / github.com/devspace-sh/devspace / StringToNumber

Function StringToNumber

pkg/util/hash/hash.go:226–230  ·  view source on GitHub ↗

StringToNumber hashes a given string to a number

(s string)

Source from the content-addressed store, hash-verified

224
225// StringToNumber hashes a given string to a number
226func StringToNumber(s string) uint32 {
227 h := fnv.New32a()
228 _, _ = h.Write([]byte(s))
229 return h.Sum32()
230}
231
232// String hashes a given string
233func String(s string) string {

Callers 1

WithPrefixMethod · 0.92

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected