File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ type Args struct {
1414 Function string
1515 Cert string
1616 Input string
17- Timeout string
17+ Timeout int
1818}
1919
2020// reads/parses user input .
@@ -27,7 +27,7 @@ func args() *Args {
2727 userPtr := flag .String ("user" , "admin" , "API Username" )
2828 pwPtr := flag .String ("pw" , "admin" , "Username Password" )
2929 fmcCertPtr := flag .String ("cert" , "" , "adding x509 Certificate if client does not trust the fmc certificate" )
30- timeoutPtr := flag .String ("timeout" , "60" , "timeout" )
30+ timeoutPtr := flag .Int ("timeout" , 60 , "timeout" )
3131
3232 flag .Parse ()
3333 return & Args {
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ func main() {
4242 }
4343
4444 //increase http timeout
45- t .HTTPClient .Timeout = time .Minute * arg .Timeout
45+ t .HTTPClient .Timeout = time .Minute * time . Duration ( arg .Timeout )
4646
4747 // run function
4848 switch arg .Function {
You can’t perform that action at this time.
0 commit comments