MCPcopy Index your code
hub / github.com/devspace-sh/devspace / String

Function String

pkg/util/hash/hash.go:233–238  ·  view source on GitHub ↗

String hashes a given string

(s string)

Source from the content-addressed store, hash-verified

231
232// String hashes a given string
233func String(s string) string {
234 hash := sha256.New()
235 _, _ = io.WriteString(hash, s)
236
237 return fmt.Sprintf("%x", hash.Sum(nil))
238}
239
240func hashFileCRC32(filePath string, polynomial uint32) (string, error) {
241 //Initialize an empty return string now in case an error has to be returned

Callers 7

DeployMethod · 0.92
replaceCommandFunction · 0.92
hashConfigFunction · 0.92
commandHashFunction · 0.92
RunOpenMethod · 0.92
ExecuteMethod · 0.92
TestHashStringFunction · 0.70

Calls 1

WriteStringMethod · 0.65

Tested by 1

TestHashStringFunction · 0.56