Update heroku-go to cyberdelia/heroku-go/v3 #184
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello Hashicorp –
TL;DR: switch Heroku Go library from bgentry/heroku-go to cyberdelia/heroku-go/v3
I wanted to take a stab at #116, but bgentry/heroku-go doesn't have support for the Heroku Build API.
I tried adding it in bgentry/heroku-go#10 but ran into issues, and Blake suggested that Tim's library (cyberdelia/heroku-go) might be a better way forward. Thankfully it includes the Build and App setup APIs I would need, but instead of 1 giant pull request that changes the library and adds the features of #116, I broke them in two. Not much sense in developing new things if the foundation they're built on gets rejected 😄
Porting over was pretty trivial; there are just a few minor differences:
heroku.Service
type instead of aheroku.Client
ID
instead ofId
AddonCreate
take 2 params, an appname
and astruct{config, plan}
, instead of 3 params forname
,config
andplan
.&
'sThe latter of which may be "wrong". I'm still a Go novice, and may be using pointers when I should be using values, or values when I should be using pointers. The changes may simply be chalked up to differences in what the two libraries return/expect, and maybe not "wrong" at all ¯_(ツ)_/¯
Caveat(s):
The Heroku tests pass:
The main test suite does not at the moment, neither on my branch or on master:
The full test output is here.
Let me know what you think!
Clint