mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
removed some prefix methods from resource
This commit is contained in:
@@ -151,7 +151,7 @@ type ResMap interface {
|
||||
// an exact match, returning an error on multiple or no matches.
|
||||
GetByCurrentId(resid.ResId) (*resource.Resource, error)
|
||||
|
||||
// GetByPreviousId is shorthand for calling
|
||||
// GetById is shorthand for calling
|
||||
// GetMatchingResourcesByAnyId with a matcher requiring
|
||||
// an exact match, returning an error on multiple or no matches.
|
||||
GetById(resid.ResId) (*resource.Resource, error)
|
||||
|
||||
@@ -282,24 +282,6 @@ func (r *Resource) appendCsvAnnotation(name, value string) {
|
||||
r.SetAnnotations(annotations)
|
||||
}
|
||||
|
||||
// Implements ResCtx GetOutermostNamePrefix
|
||||
func (r *Resource) GetOutermostNamePrefix() string {
|
||||
namePrefixes := r.GetNamePrefixes()
|
||||
if len(namePrefixes) == 0 {
|
||||
return ""
|
||||
}
|
||||
return namePrefixes[len(namePrefixes)-1]
|
||||
}
|
||||
|
||||
// Implements ResCtx GetOutermostNameSuffix
|
||||
func (r *Resource) GetOutermostNameSuffix() string {
|
||||
nameSuffixes := r.GetNameSuffixes()
|
||||
if len(nameSuffixes) == 0 {
|
||||
return ""
|
||||
}
|
||||
return nameSuffixes[len(nameSuffixes)-1]
|
||||
}
|
||||
|
||||
func SameEndingSubarray(shortest, longest []string) bool {
|
||||
if len(shortest) > len(longest) {
|
||||
longest, shortest = shortest, longest
|
||||
|
||||
Reference in New Issue
Block a user