This commit is contained in:
Chao Xu
2015-10-08 18:30:38 -07:00
parent d1d10f8361
commit 50a2c4c643
19 changed files with 36 additions and 36 deletions

View File

@@ -116,7 +116,7 @@ func (c *Client) ComponentStatuses() ComponentStatusInterface {
// VersionInterface has a method to retrieve the server version.
type VersionInterface interface {
ServerVersion() (*version.Info, error)
ServerAPIVersions() (*api.APIVersions, error)
ServerAPIVersions() (*unversioned.APIVersions, error)
}
// APIStatus is exposed by errors that can be converted to an api.Status object
@@ -146,12 +146,12 @@ func (c *Client) ServerVersion() (*version.Info, error) {
}
// ServerAPIVersions retrieves and parses the list of API versions the server supports.
func (c *Client) ServerAPIVersions() (*api.APIVersions, error) {
func (c *Client) ServerAPIVersions() (*unversioned.APIVersions, error) {
body, err := c.Get().UnversionedPath("").Do().Raw()
if err != nil {
return nil, err
}
var v api.APIVersions
var v unversioned.APIVersions
err = json.Unmarshal(body, &v)
if err != nil {
return nil, fmt.Errorf("got '%s': %v", string(body), err)