find partial resource matches

This commit is contained in:
deads2k
2015-12-07 08:12:24 -05:00
parent 837a070d2f
commit 20f9c2c545
19 changed files with 698 additions and 130 deletions

View File

@@ -29,6 +29,10 @@ type GroupResource struct {
Resource string
}
func (gr GroupResource) WithVersion(version string) GroupVersionResource {
return GroupVersionResource{Group: gr.Group, Version: version, Resource: gr.Resource}
}
func (gr GroupResource) IsEmpty() bool {
return len(gr.Group) == 0 && len(gr.Resource) == 0
}