use GroupVersion in APIGroupVersion for api installer

This commit is contained in:
deads2k
2015-11-12 15:20:20 -05:00
parent 3d123ba390
commit 3c725f17ea
8 changed files with 209 additions and 195 deletions

View File

@@ -56,6 +56,15 @@ func ParseGroupVersion(gv string) (GroupVersion, error) {
}
}
func ParseGroupVersionOrDie(gv string) GroupVersion {
ret, err := ParseGroupVersion(gv)
if err != nil {
panic(err)
}
return ret
}
// MarshalJSON implements the json.Marshaller interface.
func (gv GroupVersion) MarshalJSON() ([]byte, error) {
s := gv.String()