orange-cloudfoundry / terraform-provider-cloudfoundry

A terraform provider to manage a Cloud Foundry instance.
Apache License 2.0
31 stars 8 forks source link

Apply and enforce `go fmt` #11

Closed dcarley closed 7 years ago

dcarley commented 7 years ago

Run go fmt ./... over all files

So that they adhere to Go's canonical style:

A lot of people, myself included, configure their editors to do this automatically, which makes it harder to work on repositories where it's not done.

Run go fmt in Travis

To detect any regressions from Go's canonical style as applied in the preceding commit.

dcarley commented 7 years ago

Travis build failed because it uses go get to fetch the latest version of Terraform which I think now require Go 1.8 to build.

Is there a reason that Terraform isn't vendored like the other dependencies?

ArthurHlt commented 7 years ago

Hello, thank you. I thought intellij was performing go fmt, obviously no. That's a good idea.

I have fixed the travis build. This is needed to support multiple versions of terraform, actually terraform change provider implementation on their RPC server side. Not vendoring let the ability to switch version of terraform to build the provider with different version of their RPC implementation.

You can have a look inside the .travis.yml file to see what it is doing to switch version.

dcarley commented 7 years ago

Thanks :+1: