MCPcopy
hub / github.com/redspread/spread / Equal

Method Equal

pkg/image/image.go:60–83  ·  view source on GitHub ↗

Equal returns if one image is the same as another

(other *Image)

Source from the content-addressed store, hash-verified

58
59// Equal returns if one image is the same as another
60func (i *Image) Equal(other *Image) bool {
61 if other == nil {
62 return false
63 }
64
65 if i.tag != other.tag {
66 return false
67 }
68
69 if i.image.String() != other.image.String() {
70 return false
71 }
72
73 if i.Build == nil && other.Build != nil {
74 return false
75 }
76
77 if i.Build != nil {
78 if !i.Build.Equal(other.Build) {
79 return false
80 }
81 }
82 return true
83}
84
85// FromString creates an Image using a string representation
86func FromString(str string) (*Image, error) {

Callers 15

TestParseNameFunction · 0.45
TestParseTagFunction · 0.45
TestParseUserNameFunction · 0.45
TestParseUserTagFunction · 0.45
TestParseRegistryUserTagFunction · 0.45
testCompareEntityFunction · 0.45
TestImageTypeFunction · 0.45
TestImageKubeFunction · 0.45
TestAppEmptyFunction · 0.45
TestAppAttachImageFunction · 0.45

Calls 1

StringMethod · 0.45

Tested by 15

TestParseNameFunction · 0.36
TestParseTagFunction · 0.36
TestParseUserNameFunction · 0.36
TestParseUserTagFunction · 0.36
TestParseRegistryUserTagFunction · 0.36
testCompareEntityFunction · 0.36
TestImageTypeFunction · 0.36
TestImageKubeFunction · 0.36
TestAppEmptyFunction · 0.36
TestAppAttachImageFunction · 0.36