address lavalamp's comments

This commit is contained in:
Chao Xu
2015-09-11 17:20:02 -07:00
parent f734a6f038
commit c733124920
8 changed files with 26 additions and 12 deletions

View File

@@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This is made a separate package and should only be imported by tests, because
// it imports testapi
package fake
import (

View File

@@ -33,7 +33,6 @@ import (
"github.com/golang/glog"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/latest"
"k8s.io/kubernetes/pkg/api/registered"
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/util"
"k8s.io/kubernetes/pkg/util/sets"
@@ -142,7 +141,7 @@ func New(c *Config) (*Client, error) {
return nil, err
}
if len(registered.GroupVersionsForGroup("experimental")) == 0 {
if _, err := latest.Group("experimental"); err != nil {
return &Client{RESTClient: client, ExperimentalClient: nil}, nil
}
experimentalConfig := *c

View File

@@ -16,6 +16,7 @@ limitations under the License.
package unversioned
// These imports are the API groups the client will support.
import (
_ "k8s.io/kubernetes/pkg/api/install"
_ "k8s.io/kubernetes/pkg/expapi/install"