MCPcopy Create free account
hub / github.com/databus23/helm-diff / String

Method String

manifest/parse.go:41–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39}
40
41func (m metadata) String() string {
42 apiBase := m.APIVersion
43 sp := strings.Split(apiBase, "/")
44 if len(sp) > 1 {
45 apiBase = strings.Join(sp[:len(sp)-1], "/")
46 }
47 name := m.Metadata.Name
48 if a := m.Metadata.Annotations; a != nil {
49 if baseName, ok := a["helm-diff/base-name"]; ok {
50 name = baseName
51 }
52 }
53 return fmt.Sprintf("%s, %s, %s (%s)", m.Metadata.Namespace, name, m.Kind, apiBase)
54}
55
56func scanYamlSpecs(data []byte, atEOF bool) (advance int, token []byte, err error) {
57 if atEOF && len(data) == 0 {

Callers 2

parseContentFunction · 0.95
objectKeyFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected