Apply gofmt to pkg directory

It was omitted from the makefile `make gofmt`
This commit is contained in:
Justin Santa Barbara 2016-11-28 02:11:47 -05:00
parent ddfa3e467e
commit 35cd96f359
25 changed files with 67 additions and 70 deletions

View File

@ -201,6 +201,7 @@ gofmt:
gofmt -w -s federation/
gofmt -w -s util/
gofmt -w -s upup/pkg/
gofmt -w -s pkg/
gofmt -w -s protokube/cmd
gofmt -w -s protokube/pkg
gofmt -w -s dns-controller/cmd

View File

@ -20,7 +20,6 @@ import (
"k8s.io/kubernetes/pkg/api/unversioned"
)
// Federation represents a federated set of kubernetes clusters
type Federation struct {
unversioned.TypeMeta `json:",inline"`

View File

@ -17,12 +17,11 @@ limitations under the License.
package kops
import (
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/types"
)
// ObjectMeta is metadata that all persisted resources must have, which includes all objects
// users must create.
type ObjectMeta struct {

View File

@ -19,9 +19,9 @@ limitations under the License.
package install
import (
"k8s.io/kubernetes/pkg/apimachinery/announced"
"k8s.io/kops/pkg/apis/kops"
"k8s.io/kops/pkg/apis/kops/v1alpha1"
"k8s.io/kubernetes/pkg/apimachinery/announced"
)
func init() {

View File

@ -18,8 +18,8 @@ package registry
import (
"fmt"
"k8s.io/kops/pkg/client/simple"
api "k8s.io/kops/pkg/apis/kops"
"k8s.io/kops/pkg/client/simple"
)
func CreateClusterConfig(clientset simple.Clientset, cluster *api.Cluster, groups []*api.InstanceGroup) error {

View File

@ -17,12 +17,11 @@ limitations under the License.
package v1alpha1
import (
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/types"
)
// ObjectMeta is metadata that all persisted resources must have, which includes all objects
// users must create.
type ObjectMeta struct {

View File

@ -304,7 +304,6 @@ func (c *Cluster) Validate(strict bool) error {
c.Spec.Topology = &TopologySpec{Masters: TopologyPublic, Nodes: TopologyPublic}
}
if c.Spec.Topology.Masters != "" && c.Spec.Topology.Nodes != "" {
if c.Spec.Topology.Masters != TopologyPublic && c.Spec.Topology.Masters != TopologyPrivate {
return fmt.Errorf("Invalid Masters value for Topology")

View File

@ -21,6 +21,7 @@ import (
"github.com/golang/glog"
api "k8s.io/kops/pkg/apis/kops"
"k8s.io/kops/pkg/apis/kops/registry"
"k8s.io/kops/pkg/apis/kops/v1alpha1"
"k8s.io/kops/pkg/client/simple"
"k8s.io/kops/util/pkg/vfs"
k8sapi "k8s.io/kubernetes/pkg/api"
@ -28,14 +29,13 @@ import (
"os"
"strings"
"time"
"k8s.io/kops/pkg/apis/kops/v1alpha1"
)
type ClusterVFS struct {
commonVFS
}
func newClusterVFS(basePath vfs.Path) (*ClusterVFS) {
func newClusterVFS(basePath vfs.Path) *ClusterVFS {
c := &ClusterVFS{}
c.init("Cluster", basePath, v1alpha1.SchemeGroupVersion)
defaultReadVersion := v1alpha1.SchemeGroupVersion.WithKind("Cluster")

View File

@ -19,6 +19,7 @@ package vfsclientset
import (
"bytes"
"fmt"
"github.com/golang/glog"
kops "k8s.io/kops/pkg/apis/kops"
"k8s.io/kops/util/pkg/vfs"
"k8s.io/kubernetes/pkg/api"
@ -27,7 +28,6 @@ import (
"os"
"reflect"
"time"
"github.com/golang/glog"
)
type commonVFS struct {

View File

@ -40,7 +40,7 @@ func newFederationVFS(c *VFSClientset) *FederationVFS {
var _ simple.FederationInterface = &FederationVFS{}
func (c *FederationVFS) Get(name string) (*api.Federation, error) {
o, err := c.get(name,)
o, err := c.get(name)
if err != nil {
return nil, err
}

View File

@ -20,9 +20,9 @@ package vfsclientset
import (
"fmt"
_ "k8s.io/kops/pkg/apis/kops/install"
_ "k8s.io/kubernetes/pkg/api/install"
"k8s.io/kubernetes/pkg/apimachinery/registered"
_ "k8s.io/kops/pkg/apis/kops/install"
)
func init() {