projectdiscovery / goflags

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

allow custom args #185

Closed tarunKoyalwar closed 6 months ago

tarunKoyalwar commented 6 months ago

Proposed Changes

package main

import (
    "testing"

    "github.com/projectdiscovery/goflags"
)

func TestNuclei(t *testing.T) {
    command := `-u https://scanme.sh -stats -pt dns`
    run(goflags.GetArgsFromString(command)...)
}

https://github.com/projectdiscovery/nuclei/pull/5148/commits/fb3365c5974aa097622eeef9f5dc58631c0cb967