Add gosimple lint

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin
2017-06-09 17:42:16 -04:00
parent 3e3934c19f
commit 3724fb7f37
13 changed files with 15 additions and 31 deletions

View File

@ -164,7 +164,7 @@ func runLogs(dockerCli *command.DockerCli, opts *logsOptions) error {
// getMaxLength gets the maximum length of the number in base 10
func getMaxLength(i int) int {
return len(strconv.FormatInt(int64(i), 10))
return len(strconv.Itoa(i))
}
type taskFormatter struct {

View File

@ -354,7 +354,7 @@ func convertNetworks(ctx context.Context, apiClient client.NetworkAPIClient, net
if err != nil {
return nil, err
}
netAttach = append(netAttach, swarm.NetworkAttachmentConfig{Target: net.Target, Aliases: net.Aliases, DriverOpts: net.DriverOpts})
netAttach = append(netAttach, swarm.NetworkAttachmentConfig(net))
}
sort.Sort(byNetworkTarget(netAttach))
return netAttach, nil