You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add --ignore option
Packages beginning with the specified path will be ignored.
Imported packages by ignored packages are still checked.
* Use pflag.StringSlice instead of custom type
* Fix option description
* Clarify dependencies from the ignored packages are still checked
* Add README section
Co-authored-by: Yuan (Bob) Gong <[email protected]>
Copy file name to clipboardExpand all lines: main.go
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,7 @@ Prerequisites:
38
38
39
39
// Flags shared between subcommands
40
40
confidenceThresholdfloat64
41
+
ignore []string
41
42
packageHelp=`
42
43
43
44
Typically, specify the Go package that builds your Go binary.
@@ -63,6 +64,7 @@ func init() {
63
64
os.Exit(1)
64
65
}
65
66
rootCmd.PersistentFlags().Float64Var(&confidenceThreshold, "confidence_threshold", 0.9, "Minimum confidence required in order to positively identify a license.")
67
+
rootCmd.PersistentFlags().StringSliceVar(&ignore, "ignore", nil, "Package path prefixes to be ignored. Dependencies from the ignored packages are still checked. Can be specified multiple times.")
0 commit comments