Skip to content

Commit

Permalink
golint && gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinChartier committed Jun 19, 2019
1 parent 1814b99 commit 47b0305
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
20 changes: 9 additions & 11 deletions commands/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ func exportEntries(serviceName, buildTag string, push bool, writer io.WriteClose
}
fullImageName := fmt.Sprintf("%s/%s:%s", registry, serviceName, buildTag)


if push {
return []client.ExportEntry{
{
Expand All @@ -75,17 +74,16 @@ func exportEntries(serviceName, buildTag string, push bool, writer io.WriteClose
},
},
}, nil
} else {
return []client.ExportEntry{
{
Type: "docker",
Attrs: map[string]string{
"name": fullImageName,
},
Output: writer,
},
}, nil
}
return []client.ExportEntry{
{
Type: "docker",
Attrs: map[string]string{
"name": fullImageName,
},
Output: writer,
},
}, nil
}

func buildService(
Expand Down
8 changes: 4 additions & 4 deletions commands/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ func runCommandAction(c *cli.Context) error {
}

var runCommand = cli.Command{
Name: "run",
Usage: "run a configured script in the configuration",
Action: runCommandAction,
SkipArgReorder: true,
Name: "run",
Usage: "run a configured script in the configuration",
Action: runCommandAction,
SkipArgReorder: true,
SkipFlagParsing: true,
}
2 changes: 2 additions & 0 deletions provisioners/localdev/livemount.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ func (provisioner *ProvisionerLocalDev) liveMounts() []cri.Mount {
return liveMounts
}

//InClusterDir returns a path relative to the mounts in the liveMounts() function above.
//For example, /home/(your username)/projects/sanic -> /hosthome/projects/sanic
func (provisioner *ProvisionerLocalDev) InClusterDir(hostDir string) string {
hostDir, err := filepath.EvalSymlinks(hostDir)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions provisioners/localdev/localdev.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func (provisioner *ProvisionerLocalDev) Registry() (string, error) {
return fmt.Sprintf("http://%s:%d", ip, RegistryNodePort), nil
}

//EdgeNodes returns the list of nodes which are running ingress controllers. In our case, it's the master node's IP
func (provisioner *ProvisionerLocalDev) EdgeNodes() ([]string, error) {
masters, err := clusterMasterNodes()
if err != nil {
Expand Down

0 comments on commit 47b0305

Please sign in to comment.