mirror of
https://github.com/lunchcat/sif.git
synced 2025-12-30 14:40:44 -08:00
feat: handle API flag
This commit is contained in:
@@ -21,6 +21,7 @@ type Settings struct {
|
||||
Timeout time.Duration
|
||||
URLs goflags.StringSlice
|
||||
File string
|
||||
ApiMode bool
|
||||
}
|
||||
|
||||
const (
|
||||
@@ -66,6 +67,10 @@ func Parse() *Settings {
|
||||
flagSet.IntVar(&settings.Threads, "threads", 10, "Number of threads to run scans on"),
|
||||
)
|
||||
|
||||
flagSet.CreateGroup("api", "API",
|
||||
flagSet.BoolVar(&settings.ApiMode, "api", false, "Enable API mode. Only useful for internal lunchcat usage"),
|
||||
)
|
||||
|
||||
if err := flagSet.Parse(); err != nil {
|
||||
log.Fatalf("Could not parse flags: %s", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user