-
Notifications
You must be signed in to change notification settings - Fork 90
Add helper functions that returns callbacks of given tool (#79) #80
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
Conversation
tarunKoyalwar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requesting some changes !!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implementation lgtm!
Suggesting some changes
- create
examples/main.gothat uses these callbacks - add it to gh build workflow
- Add example to gh workflow
tarunKoyalwar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
this helper function and goflags callbackvar will be used in following way across all tools
Lines 16 to 32 in 87dc669
| flagSet := goflags.NewFlagSet() | |
| toolName := "nuclei" | |
| flagSet.CreateGroup("update", "Update", | |
| flagSet.CallbackVarP(utils.GetUpdaterCallback(toolName), "update", "up", fmt.Sprintf("update %v to the latest released version", toolName)), | |
| flagSet.BoolVarP(&options.DisableUpdateCheck, "disable-update-check", "duc", false, "disable automatic update check"), | |
| ) | |
| if err := flagSet.Parse(); err != nil { | |
| panic(err) | |
| } | |
| if !options.DisableUpdateCheck { | |
| msg := utils.GetVersionCheckCallback(toolName)() | |
| fmt.Println(msg) | |
| } | |
| } |
No description provided.