This repository was archived by the owner on Sep 28, 2021. It is now read-only.
Repository navigation
Conversation
feedback on context change added
wennmo
reviewed
Aug 12, 2019
wennmo
left a comment
Member
There was a problem hiding this comment.
Looks good overall! This is definitely something we should try to get in soon.
wennmo
reviewed
Aug 20, 2019
wennmo
approved these changes
Aug 20, 2019
gabbaxx
suggested changes
Aug 20, 2019
| globalFlags.Bool("no-data", false, "Open app without data") | ||
| globalFlags.Bool("bash", false, "Bash flag used to adapt output to bash completion format") | ||
| globalFlags.MarkHidden("bash") | ||
| globalFlags.String("context", "", "Specific context that should be used when connecting") |
Contributor
There was a problem hiding this comment.
=> "Name of context to use when connecting to the Qlik Associative Engine" or something similar?
Contributor
Author
There was a problem hiding this comment.
Updated to more descriptive text similar to that of engine url.
| context = handler.GetCurrent() | ||
| } | ||
| updated := context.Update(&map[string]interface{}{ | ||
| "engine": viper.GetString("engine"), |
Contributor
Author
There was a problem hiding this comment.
As engine is the name of the flag and used similarly in config it seems like the best name here as well.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR adds the ability to use global contexts.
Specifically adds the subcommand context with the commands
set, rm, ls, get, clearto work with contexts. List of the commands:setis used to create new contexts or update existing ones.rmremoves the specified contextlslists the available contexts while marking which is the currently used.getreturns a more exhaustive representation of a context. Current context if nothing else is specified.clearsets the current context to an empty string.Any command that changes the current context will inform the user by printing:
Context: <current-context>Furthermore, the precedence will be: cli-flags > config > context.
Closes #315