Skip to content

Fix linting issues revealed by Go 1.11#2693

Merged
anshulpundir merged 1 commit into
moby:masterfrom
thaJeztah:fix_linting_issues
Jul 9, 2018
Merged

Fix linting issues revealed by Go 1.11#2693
anshulpundir merged 1 commit into
moby:masterfrom
thaJeztah:fix_linting_issues

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

Go 1.11 is stricter, and compilation will fail, revealing these issues;

agent/agent_test.go:120: *github.com/docker/swarmkit/api.WeightedPeer composite literal uses unkeyed fields
agent/agent_test.go:125: *github.com/docker/swarmkit/api.WeightedPeer composite literal uses unkeyed fields
agent/agent_test.go:130: *github.com/docker/swarmkit/api.WeightedPeer composite literal uses unkeyed fields
agent/agent_test.go:135: *github.com/docker/swarmkit/api.WeightedPeer composite literal uses unkeyed fields
agent/agent_test.go:140: *github.com/docker/swarmkit/api.WeightedPeer composite literal uses unkeyed fields
manager/dispatcher/dispatcher.go:426: Entry.Info call has possible formatting directive %s
manager/dispatcher/dispatcher.go:547: Entry.Debug call has possible formatting directive %s
make: *** [vet] Error 1

Go 1.11 is stricter, and compilation will fail, revealing these issues;

```
agent/agent_test.go:120: *github.com/docker/swarmkit/api.WeightedPeer composite literal uses unkeyed fields
agent/agent_test.go:125: *github.com/docker/swarmkit/api.WeightedPeer composite literal uses unkeyed fields
agent/agent_test.go:130: *github.com/docker/swarmkit/api.WeightedPeer composite literal uses unkeyed fields
agent/agent_test.go:135: *github.com/docker/swarmkit/api.WeightedPeer composite literal uses unkeyed fields
agent/agent_test.go:140: *github.com/docker/swarmkit/api.WeightedPeer composite literal uses unkeyed fields
manager/dispatcher/dispatcher.go:426: Entry.Info call has possible formatting directive %s
manager/dispatcher/dispatcher.go:547: Entry.Debug call has possible formatting directive %s
make: *** [vet] Error 1
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 7, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@39d5dc4). Click here to learn what that means.
The diff coverage is 50%.

@@            Coverage Diff            @@
##             master    #2693   +/-   ##
=========================================
  Coverage          ?   61.82%           
=========================================
  Files             ?      134           
  Lines             ?    21764           
  Branches          ?        0           
=========================================
  Hits              ?    13456           
  Misses            ?     6857           
  Partials          ?     1451

@dperny
Copy link
Copy Markdown
Collaborator

dperny commented Jul 9, 2018

LGTM, let's ship it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants