Refactor to enable packaging glab inside another golang CLI tool (overriding config location)
Created by: addshore
Describe the feature or problem you'd like to solve
I would like to incorporate a gitlab
sub command into a CLI I am developing for MediaWiki / Wikimedia developers.
This would work as part of an already released binary, and be automatically configured to point to the Wikimedia Gitlab instance
Propose a Solution
Refactor glinstance
and or Factory to allow overriding the location of the configuration file as well as the domain to be use for gitlab.
This would allow users to use a version of the glab CLI packaged within the mwcli as well as a standalone glab binary pointing to the default instance.
Additional context
It would appear something like this:
Other CLI codebase: https://gitlab.wikimedia.org/releng/cli