refactor: use 'native' as engine type for go#121
Merged
Conversation
The previous 'golang' identifier described how the engine was built; 'native' better describes how it runs to users (alongside docker, jvm, unpacked). The legacy 'golang' value is silently accepted as a hidden alias on all user input surfaces (CLI -t flag, IMPOSTER_ENGINE env var, engine: in config.yaml). The viper key 'golang.binCache' is also aliased to 'native.binCache'. The on-disk binary cache moves from ~/.imposter/engines/golang to .../native; existing cached binaries will be re-downloaded on next use. https://claude.ai/code/session_01SZZ9kd4vHzzsCQzxGbvW9d
b36ef8f to
0e2d649
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Rename the engine type identifier
golangtonativeso the value tells users how the engine runs, alongsidedocker,jvm, andunpacked, rather than how it was built.Summary
EngineTypeGolangtoEngineTypeNativeand move the package frominternal/engine/golangtointernal/engine/native.nativein place ofgolang.golangas a hidden alias wherever the engine type is configured (CLI-tflag,IMPOSTER_ENGINE,engine:in config), normalised at a single entry point.golang.binCachetonative.binCacheso existing configuration andIMPOSTER_GOLANG_BINCACHEcontinue to work.~/.imposter/engines/golangto~/.imposter/engines/native.Implementation details
The real artefacts published by the upstream engine project are intentionally left untouched: the binary name
imposter-go, the GitHub repository, release URLs, and theimposter-go-pluginslocation all keep their existing identifiers. Only the user-facing engine label is renamed.Existing cached binaries under the old path are orphaned and will be re-downloaded on next use; this was a deliberate trade-off to keep the cache directory aligned with the canonical name rather than maintaining a permanent compatibility shim.