Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

travis: add go 1.10 #647

Merged
merged 1 commit into from
Jun 28, 2018
Merged

Conversation

zhouhao3
Copy link

@zhouhao3 zhouhao3 commented Jun 4, 2018

Signed-off-by: Zhou Hao [email protected]

@liangchenye
Copy link
Member

The CI failed, Go 1.10 seems quite different from previous versions.

@liangchenye
Copy link
Member

https://github.com/opencontainers/runtime-tools/blob/master/api/socket/socket.go#L18

// Message is the normal data for messages passed on the console socket.
type Message struct {
	// Type of message being passed
	Type string `json:"type"`
}

// Response is the normal data for response messages.
type Response struct {
	Message

	// Message is a phrase describing the response.
	Message string `json:"message,omitempty"`
}

Error detected here: api/socket/socket.go:22:2: duplicate field Message
@wking can we change type Message struct to type Data struct ?

@zhouhao3
Copy link
Author

zhouhao3 commented Jun 4, 2018

The reason for the current error is that there are multiple files in the document validation in the go vet detection, which contain the main function. Now I think of setting up folders for them respectively. Do you have any good ideas?

➜  runtime-tools git:(add-go1.10) ✗ go vet ./validation/...
# github.com/opencontainers/runtime-tools/validation
validation/create.go:16:6: main redeclared in this block
        previous declaration at validation/config_updates_without_affect.go:18:6
validation/default.go:7:6: main redeclared in this block
        previous declaration at validation/create.go:16:6
validation/delete.go:16:6: main redeclared in this block
        previous declaration at validation/default.go:7:6
validation/hooks.go:17:6: main redeclared in this block
        previous declaration at validation/delete.go:16:6
validation/hooks_stdin.go:78:6: main redeclared in this block
        previous declaration at validation/hooks.go:17:6
validation/hostname.go:27:6: main redeclared in this block
        previous declaration at validation/hooks_stdin.go:78:6
validation/kill.go:16:6: main redeclared in this block
        previous declaration at validation/hostname.go:27:6
validation/kill_no_effect.go:16:6: main redeclared in this block
        previous declaration at validation/kill.go:16:6
validation/killsig.go:20:6: main redeclared in this block
        previous declaration at validation/kill_no_effect.go:16:6
validation/linux_cgroups_blkio.go:8:6: main redeclared in this block
        previous declaration at validation/killsig.go:20:6
validation/linux_cgroups_blkio.go:8:6: too many errors

@dongsupark
Copy link
Contributor

@q384566678 Yeah indeed.
go vet 1.10 does not allow multiple definitions of main function in a single directory. That actually looks like a good behavior.
I agree that we need to move each test file into a subdirectory, for example, from validation/create.go to validation/create/create.go.
Then probably I would also need to update my PRs. That's fine. :-)

@wking
Copy link
Contributor

wking commented Jun 5, 2018

@wking can we change type Message struct to type Data struct?

I'd prefer Type, Common, or Base. Data doesnt make as much sense to me for a structure that only holds a type property.

I agree that we need to move each test file into a subdirectory, for example, from validation/create.go to validation/create/create.go.

Sounds good to me :).

@zhouhao3
Copy link
Author

zhouhao3 commented Jun 6, 2018

Then probably I would also need to update my PRs. That's fine. :-)

Before this PR is merged I will review your PRs first.

Signed-off-by: Zhou Hao <[email protected]>
@zhouhao3
Copy link
Author

@liangchenye updated, PTAL.

@liangchenye
Copy link
Member

liangchenye commented Jun 28, 2018

LGTM
Thanks

Approved with PullApprove

@liangchenye liangchenye merged commit fef2a70 into opencontainers:master Jun 28, 2018
@zhouhao3 zhouhao3 deleted the add-go1.10 branch June 29, 2018 06:30
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.

4 participants