Merge pull request #29230 from luxas/goimport

Automatic merge from submit-queue

Run goimport for the whole repo

While removing GOMAXPROC and running goimports, I noticed quite a lot of other files also needed a goimport format. Didn't commit `*.generated.go`, `*.deepcopy.go` or files in `vendor`

This is more for testing if it builds.
The only strange thing here is the gopkg.in/gcfg.v1 => github.com/scalingdata/gcfg replace.
cc @jfrazelle @thockin
This commit is contained in:
Kubernetes Submit Queue 2016-08-05 16:22:01 -07:00 committed by GitHub
commit 2537f66f0e
28 changed files with 59 additions and 30 deletions

View File

@ -19,6 +19,7 @@ package stubs
import ( import (
"fmt" "fmt"
"github.com/aws/aws-sdk-go/service/route53" "github.com/aws/aws-sdk-go/service/route53"
) )

View File

@ -31,9 +31,10 @@ import (
"k8s.io/kubernetes/pkg/util/workqueue" "k8s.io/kubernetes/pkg/util/workqueue"
"k8s.io/kubernetes/pkg/watch" "k8s.io/kubernetes/pkg/watch"
"reflect"
"github.com/golang/glog" "github.com/golang/glog"
"k8s.io/kubernetes/federation/pkg/federation-controller/util" "k8s.io/kubernetes/federation/pkg/federation-controller/util"
"reflect"
) )
type clusterCache struct { type clusterCache struct {

View File

@ -19,13 +19,14 @@ package cluster
import ( import (
"testing" "testing"
"reflect"
"k8s.io/kubernetes/federation/apis/federation" "k8s.io/kubernetes/federation/apis/federation"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/testapi"
apitesting "k8s.io/kubernetes/pkg/api/testing" apitesting "k8s.io/kubernetes/pkg/api/testing"
"k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels" "k8s.io/kubernetes/pkg/labels"
"reflect"
) )
func validNewCluster() *federation.Cluster { func validNewCluster() *federation.Cluster {

View File

@ -19,9 +19,10 @@ package service
import ( import (
"testing" "testing"
"strings"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
netsets "k8s.io/kubernetes/pkg/util/net/sets" netsets "k8s.io/kubernetes/pkg/util/net/sets"
"strings"
) )
func TestGetLoadBalancerSourceRanges(t *testing.T) { func TestGetLoadBalancerSourceRanges(t *testing.T) {

View File

@ -19,10 +19,11 @@ package apiserver
import ( import (
"net/http" "net/http"
"time"
"k8s.io/kubernetes/pkg/probe" "k8s.io/kubernetes/pkg/probe"
httpprober "k8s.io/kubernetes/pkg/probe/http" httpprober "k8s.io/kubernetes/pkg/probe/http"
utilnet "k8s.io/kubernetes/pkg/util/net" utilnet "k8s.io/kubernetes/pkg/util/net"
"time"
) )
const ( const (

View File

@ -21,10 +21,11 @@ import (
"fmt" "fmt"
"testing" "testing"
"k8s.io/kubernetes/pkg/probe"
"net/http" "net/http"
"net/url" "net/url"
"time" "time"
"k8s.io/kubernetes/pkg/probe"
) )
type fakeHttpProber struct { type fakeHttpProber struct {

View File

@ -30,8 +30,9 @@ import (
utilruntime "k8s.io/kubernetes/pkg/util/runtime" utilruntime "k8s.io/kubernetes/pkg/util/runtime"
"k8s.io/kubernetes/pkg/watch" "k8s.io/kubernetes/pkg/watch"
"github.com/golang/glog"
"net/http" "net/http"
"github.com/golang/glog"
) )
const maxTriesPerEvent = 12 const maxTriesPerEvent = 12

View File

@ -26,6 +26,7 @@ import (
"time" "time"
"fmt" "fmt"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/testapi"

View File

@ -28,6 +28,8 @@ import (
"sync" "sync"
"time" "time"
"gopkg.in/gcfg.v1"
"github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/credentials"
@ -39,7 +41,6 @@ import (
"github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/elb" "github.com/aws/aws-sdk-go/service/elb"
"github.com/golang/glog" "github.com/golang/glog"
"gopkg.in/gcfg.v1"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/service" "k8s.io/kubernetes/pkg/api/service"

View File

@ -23,9 +23,11 @@ import (
"net" "net"
"regexp" "regexp"
"golang.org/x/net/context"
log "github.com/golang/glog" log "github.com/golang/glog"
"github.com/mesos/mesos-go/detector" "github.com/mesos/mesos-go/detector"
"golang.org/x/net/context"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/cloudprovider"
) )

View File

@ -30,6 +30,7 @@ import (
"strings" "strings"
"gopkg.in/gcfg.v1" "gopkg.in/gcfg.v1"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/cloudprovider"
) )

View File

@ -28,6 +28,9 @@ import (
"strings" "strings"
"time" "time"
"gopkg.in/gcfg.v1"
"github.com/golang/glog"
"github.com/rackspace/gophercloud" "github.com/rackspace/gophercloud"
osvolumeattach "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/volumeattach" osvolumeattach "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/volumeattach"
osservers "github.com/rackspace/gophercloud/openstack/compute/v2/servers" osservers "github.com/rackspace/gophercloud/openstack/compute/v2/servers"
@ -36,9 +39,7 @@ import (
"github.com/rackspace/gophercloud/rackspace/blockstorage/v1/volumes" "github.com/rackspace/gophercloud/rackspace/blockstorage/v1/volumes"
"github.com/rackspace/gophercloud/rackspace/compute/v2/servers" "github.com/rackspace/gophercloud/rackspace/compute/v2/servers"
"github.com/rackspace/gophercloud/rackspace/compute/v2/volumeattach" "github.com/rackspace/gophercloud/rackspace/compute/v2/volumeattach"
"gopkg.in/gcfg.v1"
"github.com/golang/glog"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/cloudprovider"
) )

View File

@ -26,6 +26,9 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"gopkg.in/gcfg.v1"
"github.com/golang/glog"
"github.com/vmware/govmomi" "github.com/vmware/govmomi"
"github.com/vmware/govmomi/find" "github.com/vmware/govmomi/find"
"github.com/vmware/govmomi/object" "github.com/vmware/govmomi/object"
@ -33,9 +36,7 @@ import (
"github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/mo"
"github.com/vmware/govmomi/vim25/types" "github.com/vmware/govmomi/vim25/types"
"golang.org/x/net/context" "golang.org/x/net/context"
"gopkg.in/gcfg.v1"
"github.com/golang/glog"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/cloudprovider"
"k8s.io/kubernetes/pkg/util/runtime" "k8s.io/kubernetes/pkg/util/runtime"

View File

@ -24,6 +24,7 @@ import (
"time" "time"
"encoding/json" "encoding/json"
"github.com/golang/glog" "github.com/golang/glog"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/endpoints" "k8s.io/kubernetes/pkg/api/endpoints"

View File

@ -17,11 +17,12 @@ limitations under the License.
package node package node
import ( import (
"github.com/golang/glog"
"math/big" "math/big"
"net" "net"
"reflect" "reflect"
"testing" "testing"
"github.com/golang/glog"
) )
func TestCIDRSetFullyAllocated(t *testing.T) { func TestCIDRSetFullyAllocated(t *testing.T) {

View File

@ -21,9 +21,10 @@ import (
"reflect" "reflect"
"strings" "strings"
"testing"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
api_pod "k8s.io/kubernetes/pkg/api/pod" api_pod "k8s.io/kubernetes/pkg/api/pod"
"testing"
) )
func TestPetIDName(t *testing.T) { func TestPetIDName(t *testing.T) {

View File

@ -19,9 +19,10 @@ package petset
import ( import (
"fmt" "fmt"
"testing"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/util/sets" "k8s.io/kubernetes/pkg/util/sets"
"testing"
) )
func TestPetQueueCreates(t *testing.T) { func TestPetQueueCreates(t *testing.T) {

View File

@ -19,8 +19,9 @@ package dns
import ( import (
"bytes" "bytes"
"encoding/json" "encoding/json"
skymsg "github.com/skynetservices/skydns/msg"
"strings" "strings"
skymsg "github.com/skynetservices/skydns/msg"
) )
type TreeCache struct { type TreeCache struct {

View File

@ -22,6 +22,7 @@ import (
"strings" "strings"
"encoding/json" "encoding/json"
"github.com/golang/glog" "github.com/golang/glog"
"github.com/renstrom/dedent" "github.com/renstrom/dedent"
"github.com/spf13/cobra" "github.com/spf13/cobra"

View File

@ -20,13 +20,14 @@ import (
"testing" "testing"
"fmt" "fmt"
"net"
"strings"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/proxy" "k8s.io/kubernetes/pkg/proxy"
"k8s.io/kubernetes/pkg/types" "k8s.io/kubernetes/pkg/types"
"k8s.io/kubernetes/pkg/util/exec" "k8s.io/kubernetes/pkg/util/exec"
utiliptables "k8s.io/kubernetes/pkg/util/iptables" utiliptables "k8s.io/kubernetes/pkg/util/iptables"
"net"
"strings"
) )
func checkAllLines(t *testing.T, table utiliptables.Table, save []byte, expectedLines map[utiliptables.Chain]string) { func checkAllLines(t *testing.T, table utiliptables.Table, save []byte, expectedLines map[utiliptables.Chain]string) {

View File

@ -19,12 +19,13 @@ package componentstatus
import ( import (
"fmt" "fmt"
"sync"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/apiserver" "k8s.io/kubernetes/pkg/apiserver"
"k8s.io/kubernetes/pkg/probe" "k8s.io/kubernetes/pkg/probe"
httpprober "k8s.io/kubernetes/pkg/probe/http" httpprober "k8s.io/kubernetes/pkg/probe/http"
"k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/runtime"
"sync"
) )
type REST struct { type REST struct {

View File

@ -22,13 +22,14 @@ import (
"strings" "strings"
"testing" "testing"
"net/http"
"net/url"
"time"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/apiserver" "k8s.io/kubernetes/pkg/apiserver"
"k8s.io/kubernetes/pkg/probe" "k8s.io/kubernetes/pkg/probe"
"k8s.io/kubernetes/pkg/util/diff" "k8s.io/kubernetes/pkg/util/diff"
"net/http"
"net/url"
"time"
) )
type fakeHttpProber struct { type fakeHttpProber struct {

View File

@ -18,6 +18,7 @@ package podsecuritypolicy
import ( import (
"fmt" "fmt"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/rest" "k8s.io/kubernetes/pkg/api/rest"
"k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/apis/extensions"

View File

@ -17,9 +17,10 @@ limitations under the License.
package capabilities package capabilities
import ( import (
"k8s.io/kubernetes/pkg/api"
"reflect" "reflect"
"testing" "testing"
"k8s.io/kubernetes/pkg/api"
) )
func TestGenerateAdds(t *testing.T) { func TestGenerateAdds(t *testing.T) {

View File

@ -17,9 +17,10 @@ limitations under the License.
package flowcontrol package flowcontrol
import ( import (
"k8s.io/kubernetes/pkg/util/clock"
"testing" "testing"
"time" "time"
"k8s.io/kubernetes/pkg/util/clock"
) )
func TestSlowBackoff(t *testing.T) { func TestSlowBackoff(t *testing.T) {

View File

@ -18,8 +18,9 @@ package keymutex
import ( import (
"fmt" "fmt"
"github.com/golang/glog"
"sync" "sync"
"github.com/golang/glog"
) )
// KeyMutex is a thread-safe interface for acquiring locks on arbitrary strings. // KeyMutex is a thread-safe interface for acquiring locks on arbitrary strings.

View File

@ -27,14 +27,15 @@ import (
"k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/watch" "k8s.io/kubernetes/pkg/watch"
"github.com/golang/glog"
"hash/fnv" "hash/fnv"
"k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/resource"
"k8s.io/kubernetes/pkg/util/sets"
"math/rand" "math/rand"
"strconv" "strconv"
"strings" "strings"
"github.com/golang/glog"
"k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/resource"
"k8s.io/kubernetes/pkg/util/sets"
) )
// RecycleVolumeByWatchingPodUntilCompletion is intended for use with volume // RecycleVolumeByWatchingPodUntilCompletion is intended for use with volume

View File

@ -18,7 +18,6 @@ package initialresources
import ( import (
"fmt" "fmt"
"k8s.io/kubernetes/pkg/api"
"net/http" "net/http"
"net/http/httptest" "net/http/httptest"
"net/url" "net/url"
@ -26,6 +25,8 @@ import (
"testing" "testing"
"time" "time"
"k8s.io/kubernetes/pkg/api"
assert "github.com/stretchr/testify/require" assert "github.com/stretchr/testify/require"
) )