Hi,
I’m confusing about the versioning of the Golang API.
I’m referring to this API: api · pkg.go.dev
The list of versions is available here: api · pkg.go.dev
go get
any of those versions is not working, example:
go get github.com/hashicorp/nomad/api@0.8.7
go get github.com/hashicorp/nomad/api@0.8.7: github.com/hashicorp/nomad/api@0.8.7: invalid version: unknown revision 0.8.7
The current revision as per my go module is cryptic:
github.com/hashicorp/nomad/api v0.0.0-20210310141246-b0ca1fd74d3c
I cannot get to change that because I’m failing to find a valid revision to download.
The code under this revision is undocumented. I have fo example this method available:
// Deployments is used to query the deployments associated with the given job
// ID.
func (j *Jobs) Deployments(jobID string, all bool, q *QueryOptions) ([]*Deployment, *QueryMeta, error) {
...
}
None of the version available in the API doc provides a jobs.Deployments method with that signature (the documented signature is Deployments(jobID string, q *QueryOptions)
- note the missing boolean). He is this method in the doc: api · pkg.go.dev
I’ve checked all released versions of this documentation and since the introduction of this method, its signature hasn’t changed. I’m confused where the method that my go module has downloaded is coming from.
How can I use a version of this API as it is documented? Is go get
meant to work and if so, how can I use go get
to download one of the documented version of this API?