MCPcopy
hub / github.com/kubernetes/kops / MustFromString

Function MustFromString

util/pkg/hashing/hash.go:97–103  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

95}
96
97func MustFromString(s string) *Hash {
98 h, err := FromString(s)
99 if err != nil {
100 klog.Fatalf("FromString(%q) failed with %v", s, err)
101 }
102 return h
103}
104
105func FromString(s string) (*Hash, error) {
106 for _, ha := range []HashAlgorithm{HashAlgorithmMD5, HashAlgorithmSHA1, HashAlgorithmSHA256} {

Callers 3

TestBootstrapUserDataFunction · 0.92
RunGoldenTestFunction · 0.92
Test_BuildMirroredAssetFunction · 0.92

Calls 1

FromStringFunction · 0.85

Tested by 3

TestBootstrapUserDataFunction · 0.74
RunGoldenTestFunction · 0.74
Test_BuildMirroredAssetFunction · 0.74