remove accidental project leakage in api/ package #6685
Merged
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.
nomad /api package should be divested from rest of nomad, to ease go mod adoption; but looks like we accidentally relied on
helper/uuid
due to my bad advice in #6650 (comment) .Removed the accidental complexity, and inlined function to avoid declaring yet another go mod dependency for tests alone.
For some context, go mod treats test dependencies just like regular dependencies; and if github.com/hashicorp/nomad is marked as a dependency, then api users may need to declaring dependency on all of nomad main project transitively, which causes sadness given main app isn't go mod friendly yet and the project dependencies are many and large.