New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: gobrew
interactive
#145
Comments
Hello! An interesting idea, but I don’t really understand what its essence is yet. Are we trying to provide some logic to the user? We don't have too many teams to get confused about. According to the given options. The first option is clear, but what if I want to install the latest version of go in the project directory with go.mod? The second case is not clear to me. If we are outside the directory with the go.mod file, how are we supposed to know to use a certain configuration? If I understand everything correctly, then for the second case the third given option will be used. There are still too many questions about the logic of work. |
Ah sorry. In Case 2, go.mod version will also be none. I have edited. |
The purpose of this is that a user will be able to achieve what he wants to achieve just by executing |
I think it looks good. |
Thanks for checking @juev |
+1 This will be useful in CI too I think |
Thanks @gedw99 |
Was thinking a —output=json would be nice too. Then it’s easy to use in CI and possibly other use cases that are not known yet. than it possible to parse the json on the call side and react to the output. maybe layer a golang client that understands the json in a strongly type way too. basically I realise it’s jsonrpc style with client and server . there are some great golang libs that do all the grunt work for json rpc out there in GitHub btw. |
Thanks @gedw99 JSON output could be nice, and I also find hard time finding it's use case. |
Fixes #145 by adding interactivity
RFC
To add interactive behaviour so I don't have to remember commands like
gobrew use mod
gobrew use latest
or evengobrew ls
andgobrew ls-remote
to check what version I am on etc and etc.Current situation
On command
gobrew
, no args, it displays help menu right now.Proposal
On hitting
gobrew
, it presents an interactive info as below:Case 1: Fresh install, from inside a directory with go.mod
Case 2: Fresh install, from outside a directory with go.mod
Case 3: Go is installed, but not latest version
Case 4: Go is installed, but not latest version, but matches mod file
Case 5: Go is installed, on latest version, but doesn't match mod file
--
gobrew
.1.1) Additionally, could add
--no-interactive y|n
option as well. But I don't think that would be necessary at this point.gobrew info
that will only display out info.The text was updated successfully, but these errors were encountered: