MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / String

Method String

testutil/image_hash.go:155–164  ·  view source on GitHub ↗

String returns a string representation of the hash

()

Source from the content-addressed store, hash-verified

153
154// String returns a string representation of the hash
155func (h *ImageHash) String() string {
156 switch h.hashType {
157 case HashTypeSHA256:
158 return fmt.Sprintf("SHA256:%x", h.sha256Hash)
159 case HashTypeDct:
160 return fmt.Sprintf("DctHash:%v", h.dctHash)
161 default:
162 return fmt.Sprintf("unknown(%d)", h.hashType)
163 }
164}
165
166// Len returns the length of the hash data (excluding type byte)
167func (h *ImageHash) Len() int {

Callers 3

TestSHA256HashCalcMethod · 0.45
saveTmpImageMethod · 0.45
anyToStringFunction · 0.45

Calls

no outgoing calls

Tested by 1

TestSHA256HashCalcMethod · 0.36