projectdiscovery / goflags

A go flag wrapper with convenience helpers
MIT License
84 stars 16 forks source link

add flag support act as flag with defaultValue or option with value #130

Closed RamanaReddy0M closed 1 year ago

RamanaReddy0M commented 1 year ago

test

case 1: Flag with default value

✗ go run examples/basic/main.go -title -target
title size: 50
target: https://example.com
Got Severity: [high]

case 2: Act as option with value

✗ go run examples/basic/main.go -title=100 -target=evil.com
title size: 100
target: evil.com
Got Severity: [high]

case 3: no flag/option mention

go run examples/basic/main.go                            
title size: 0
target: 
Got Severity: [high]