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

many: run go fmt ./... #6210

Closed
wants to merge 1 commit into from
Closed

many: run go fmt ./... #6210

wants to merge 1 commit into from

Conversation

zyga
Copy link
Collaborator

@zyga zyga commented Nov 23, 2018

Apparently go 1.11.1 changed format style because I get formatting
errors when running ./run-checks --static

Signed-off-by: Zygmunt Krynicki me@zygoon.pl

Apparently go 1.11.1 changed format style because I get formatting
errors when running ./run-checks --static

Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
@chipaca
Copy link
Contributor

chipaca commented Nov 23, 2018

I think we need to not run go fmt if go is > 1.10.
You can write that like

[[ "$(go version)" =~ go1\.(1[1-9])\.[0-9] ]]

fwiw

@mvo5
Copy link
Contributor

mvo5 commented Nov 23, 2018

This seems to be re-formating everything with go 1.11 ? I think this is not what we want util we can all move to go 1.11. Cosmic is still on 1.10 fwiw so I we probably want to defer that until a later time.

@zyga
Copy link
Collaborator Author

zyga commented Nov 23, 2018

Perhaps we should drop this checker then. It prevents a team of collaborators using both go 1.6 and 1.11 from being "clean" for local testing.

@mvo5
Copy link
Contributor

mvo5 commented Nov 23, 2018

Maybe - there will be flip-flop changes in the files that are touched by go1.6 and go1.11. I.e. my editor automatically runs go fmt as pre-save so if two people work on the same file with two version things will always be ugly. I think we need to discuss what to do. Ideally go1.11 would have a compat option.

@zyga
Copy link
Collaborator Author

zyga commented Nov 23, 2018

I'll close this for now. I didn't expect to merge it straight away, just wanted to raise awareness.

@zyga zyga closed this Nov 23, 2018
@zyga zyga deleted the tweak/gofmt branch November 23, 2018 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants