Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Fix CI for go1.7 - #382

Merged
tiborvass merged 1 commit into
docker-archive-public:masterfrom
tonistiigi:fix-go17
Sep 3, 2016
Merged

tiborvass merged 1 commit into
docker-archive-public:masterfrom
tonistiigi:fix-go17

Conversation

@tonistiigi

Copy link
Copy Markdown
Contributor

govet detected a case where we copy tls.Config although
the var contains mutexes. This is fixed in go1.8 with a
stdlib Clone method. Temporarily add a local copy of that
function until we can move to go1.8

Signed-off-by: Tonis Tiigi [email protected]

govet detected a case where we copy tls.Config although
the var contains mutexes. This is fixed in go1.8 with a
stdlib Clone method. Temporarily add a local copy of that 
function until we can move to go1.8 

Signed-off-by: Tonis Tiigi <[email protected]>
@tonistiigi

Copy link
Copy Markdown
Contributor Author

@tiborvass @aaronlehmann

@tiborvass

Copy link
Copy Markdown
Contributor

So this will not work for Go1.6 and under, I guess it's fine. LGTM

@aaronlehmann

Copy link
Copy Markdown

Is this really how Clone is implemented upstream? I know we don't care for our purposes, but I would expect a function called Clone to make a deep copy of slices and maps inside the struct. Otherwise changes to the slice or map in the original object will affect the clone, or vice versa.

@tonistiigi

Copy link
Copy Markdown
Contributor Author

@tiborvass I can make a go1.6 function as well if you think it's important. We can't reuse the same function though because new keys were added.

@aaronlehmann golang/go@d24f446 golang/go@db58021

@aaronlehmann

Copy link
Copy Markdown

Fair enough: Clone returns a shallow clone of c.

@aaronlehmann

Copy link
Copy Markdown

LGTM

@tiborvass
tiborvass merged commit 611c63f into docker-archive-public:master Sep 3, 2016
jarondl added a commit to jarondl/telegraf that referenced this pull request Feb 15, 2017
The docker engine-api package we use needs golang 1.7+, see:
docker-archive-public/docker.engine-api#382 (comment)

So telegraf won't compile without 1.7
sparrc pushed a commit to influxdata/telegraf that referenced this pull request Feb 15, 2017
The docker engine-api package we use needs golang 1.7+, see:
docker-archive-public/docker.engine-api#382 (comment)

So telegraf won't compile without 1.7
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants