Merge pull request #5543 from you-n-g/master

add get available versions commmand
This commit is contained in:
Jeff Lowdermilk
2015-03-17 17:34:33 -07:00
8 changed files with 253 additions and 1 deletions

View File

@@ -16,6 +16,10 @@ limitations under the License.
package api
import (
"strings"
)
// This file contains API types that are unversioned.
// APIVersions lists the api versions that are available, to allow
@@ -49,3 +53,12 @@ func FieldSelectorQueryParam(version string) string {
}
return "field-selector"
}
// String returns available api versions as a human-friendly version string.
func (apiVersions APIVersions) String() string {
return strings.Join(apiVersions.Versions, ",")
}
func (apiVersions APIVersions) GoString() string {
return apiVersions.String()
}