mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
Fix go lint error and add golint checks to a pre-commit hook
This commit is contained in:
@@ -30,6 +30,7 @@ type ResId struct {
|
||||
name string
|
||||
}
|
||||
|
||||
// NewResId creates new resource identifier
|
||||
func NewResId(g schema.GroupVersionKind, n string) ResId {
|
||||
return ResId{gvk: g, name: n}
|
||||
}
|
||||
@@ -41,10 +42,12 @@ func (n ResId) String() string {
|
||||
return strings.Join([]string{n.gvk.Group, n.gvk.Version, n.gvk.Kind, n.name}, "_") + ".yaml"
|
||||
}
|
||||
|
||||
// Gvk returns Group/Version/Kind of the resource.
|
||||
func (n ResId) Gvk() schema.GroupVersionKind {
|
||||
return n.gvk
|
||||
}
|
||||
|
||||
// Name returns resource name.
|
||||
func (n ResId) Name() string {
|
||||
return n.name
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user