Skip to content

Commit

Permalink
versions: Update golang to 1.10.4
Browse files Browse the repository at this point in the history
Move to golang version 1.10.4 -- the oldest stable golang release at the
time of writing -- since golang 1.10+ is needed to make namespace
handling safe.

Re-ordered a couple of structs (moved `sync.WaitGroup` fields) to keep
the `maligned` linter happy. Previously:

``
virtcontainers/pkg/mock/cc_proxy_mock.go:24:18:warning: struct of size 160 could be 152 (maligned)
virtcontainers/monitor.go:15:14:warning: struct of size 80 could be 72 (maligned)
```

See:

- golang/go#20676
- golang/go@2595fe7

Also bumped `languages.golang.meta.newest-version` to golang version
1.11, which is the newest stable release at the time of writing.

Fixes kata-containers#148.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
  • Loading branch information
jodh-intel committed Sep 20, 2018
1 parent 7d8ce4e commit 67979b4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,10 @@ languages:
golang:
description: "Google's 'go' language"
notes: "'version' is the default minimum version used by this project."
version: "1.9.7"
issue: "https://github.com/golang/go/issues/20676"
version: "1.10.4"
meta:
newest-version: "1.10"
newest-version: "1.11"

specs:
description: "Details of important specifications"
Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ type monitor struct {
sandbox *Sandbox
checkInterval time.Duration
watchers []chan error
wg sync.WaitGroup
running bool
stopCh chan bool
wg sync.WaitGroup
}

func newMonitor(s *Sandbox) *monitor {
Expand Down
3 changes: 2 additions & 1 deletion virtcontainers/pkg/mock/cc_proxy_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ type CCProxyMock struct {
sync.Mutex

t *testing.T
wg sync.WaitGroup
connectionPath string

// proxy socket
Expand All @@ -44,6 +43,8 @@ type CCProxyMock struct {
ShimDisconnected chan bool
StdinReceived chan bool

wg sync.WaitGroup

stopped bool
}

Expand Down

0 comments on commit 67979b4

Please sign in to comment.