added global appendable Flags (#12) #26
No reviewers
Labels
No Label
kind/breaking
kind/bug
kind/build
kind/dependency
kind/deployment
kind/docs
kind
enhancement
kind
feature
kind/proposal
kind
question
kind
refactor
kind/security
kind/testing
kind/translation
priority/critical
priority/high
priority/low
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/has-backport
status/has-pull
status/needs-backport
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
upstream/sdk
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/tea#26
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "root360-AndreasUlm/12_global_cli_flags"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Author: @root360-AndreasUlm
PR to discuss global flag options.
Signed-off-by: Andreas Ulm andreas.ulm@root360.de
Author: @zeripath
You might want to take a look at the way I've done it in the main Gitea binary. I'm not certain that the technique used there is definitely applicable but it shows a way of doing global options without referencing multiple files.
Author: @root360-AndreasUlm
This technique (https://github.com/go-gitea/gitea/blob/master/main.go#L97) does not work for tea as there are no flags that are required for all commands. The mostly used flags are --login, --output and --repo but those are not used by the subcommands login and logout. That's why I think this technique is not suited for tea.
Author: @zeripath
Fair enough. I'm not particularly au fait with how tea does things but saw what you were doing looked slightly similar.
Author: @root360-AndreasUlm
This PR can IMHO be merged now as I'm done with the implementation.
After merging it I'll rebase and update #25 and #13.
Why not
As above.
@root360-AndreasUlm I have added some comments on code.
@lunny as we currently don't need any additional flag thus you are right with your comments.
Unfortunately I cannot push changes to the branch root360-AndreasUlm/12_global_cli_flags.
Shall open a new PR from my fork on gitea?
Yes, please, I will close this one after you created a new one.
@lunny created new PR #39
Pull request closed