Skip to content

Commit

Permalink
Formated files with --simplify flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ernoaapa committed Feb 8, 2018
1 parent f73a7d0 commit ae8186c
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 19 deletions.
6 changes: 6 additions & 0 deletions .vscode/settings.json
@@ -0,0 +1,6 @@
{
"go.formatTool": "gofmt",
"go.formatFlags": [
"-s"
]
}
2 changes: 1 addition & 1 deletion cmd/eli/runCommand.go
Expand Up @@ -125,7 +125,7 @@ var runCommand = cli.Command{
Spec: &pods.PodSpec{
HostNetwork: true,
Containers: []*containers.Container{
&containers.Container{
{
Name: name,
Image: image,
Tty: tty,
Expand Down
2 changes: 1 addition & 1 deletion cmd/eli/upCommand.go
Expand Up @@ -166,7 +166,7 @@ var upCommand = cli.Command{
Spec: &pods.PodSpec{
HostNetwork: true,
Containers: []*containers.Container{
&containers.Container{
{
Name: name,
Image: image,
Tty: tty,
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/server_test.go
Expand Up @@ -8,10 +8,10 @@ import (

func TestGetMetadataValue(t *testing.T) {
md := map[string][]string{
"foo": []string{
"foo": {
"bar",
},
"crazy": []string{
"crazy": {
"first",
"second",
},
Expand Down
6 changes: 3 additions & 3 deletions pkg/api/services/pods/v1/defaults_test.go
Expand Up @@ -10,22 +10,22 @@ import (

func TestDefaults(t *testing.T) {
pods := []*Pod{
&Pod{
{
Metadata: &core.ResourceMetadata{
Name: "foobar",
},
Spec: &PodSpec{
Containers: []*containers.Container{},
},
},
&Pod{
{
Metadata: &core.ResourceMetadata{
Name: "foobar",
Namespace: "my-namespace",
},
Spec: &PodSpec{
Containers: []*containers.Container{
&containers.Container{
{
Name: "foo",
Image: "docker.io/library/hello-world:latest",
},
Expand Down
8 changes: 4 additions & 4 deletions pkg/model/pod_test.go
Expand Up @@ -48,7 +48,7 @@ func TestValidationRequiresMetadata(t *testing.T) {
assert.Error(t, getValidator().Struct(Pod{
Spec: PodSpec{
Containers: []Container{
Container{
{
Name: "foo",
Image: "docker.io/eaapa/hello-world:latest",
},
Expand All @@ -62,7 +62,7 @@ func TestValidationNameMetadata(t *testing.T) {
Metadata: Metadata{},
Spec: PodSpec{
Containers: []Container{
Container{
{
Name: "foo",
Image: "docker.io/eaapa/hello-world:latest",
},
Expand All @@ -76,7 +76,7 @@ func TestValidationNameMetadata(t *testing.T) {
},
Spec: PodSpec{
Containers: []Container{
Container{
{
Name: "foo",
Image: "docker.io/eaapa/hello-world:latest",
},
Expand All @@ -93,7 +93,7 @@ func TestValidationNamespaceMetadata(t *testing.T) {
},
Spec: PodSpec{
Containers: []Container{
Container{
{
Name: "foo",
Image: "docker.io/eaapa/hello-world:latest",
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/model/validation_test.go
Expand Up @@ -8,13 +8,13 @@ import (

func TestValidationIsValid(t *testing.T) {
err := Validate([]Pod{
Pod{
{
Metadata: Metadata{
Name: "foo",
},
Spec: PodSpec{
Containers: []Container{
Container{
{
Name: "foo-1",
Image: "docker.io/library/foobar",
Args: []string{
Expand Down
12 changes: 6 additions & 6 deletions pkg/printers/interface_test.go
Expand Up @@ -20,8 +20,8 @@ var examplePod = &pods.Pod{
},
Spec: &pods.PodSpec{
Containers: []*containers.Container{
&containers.Container{},
&containers.Container{},
{},
{},
},
},
}
Expand Down Expand Up @@ -78,7 +78,7 @@ func testPrintDevice(t *testing.T, printer ResourcePrinter) {
var buffer bytes.Buffer

data := &device.Info{
Labels: []*device.Label{&device.Label{Key: "foo", Value: "bar"}},
Labels: []*device.Label{{Key: "foo", Value: "bar"}},
Hostname: "foo-bar",
Addresses: []string{"1.2.3.4"},
GrpcPort: 5000,
Expand Down Expand Up @@ -118,8 +118,8 @@ func testPrintPod(t *testing.T, printer ResourcePrinter) {
},
Spec: &pods.PodSpec{
Containers: []*containers.Container{
&containers.Container{},
&containers.Container{},
{},
{},
},
},
Status: &pods.PodStatus{
Expand All @@ -139,7 +139,7 @@ func testPrintConfig(t *testing.T, printer ResourcePrinter) {

data := &config.Config{
Endpoints: []config.Endpoint{
config.Endpoint{Name: "localhost", URL: "localhost:5000"},
{Name: "localhost", URL: "localhost:5000"},
},
Namespace: "default",
}
Expand Down

0 comments on commit ae8186c

Please sign in to comment.