@@ -29,6 +29,8 @@ type Options struct {
2929 TCPWithTLS bool
3030 Version bool
3131 Silent bool
32+ Sandbox bool
33+ MaxFileSize int
3234}
3335
3436// ParseOptions parses the command line options for application
@@ -38,7 +40,11 @@ func ParseOptions() *Options {
3840 flag .BoolVar (& options .EnableTCP , "tcp" , false , "TCP Server" )
3941 flag .BoolVar (& options .TCPWithTLS , "tls" , false , "Enable TCP TLS" )
4042 flag .StringVar (& options .RulesFile , "rules" , "" , "Rules yaml file" )
41- flag .StringVar (& options .Folder , "path" , "." , "Folder" )
43+ currentPath := "."
44+ if p , err := os .Getwd (); err == nil {
45+ currentPath = p
46+ }
47+ flag .StringVar (& options .Folder , "path" , currentPath , "Folder" )
4248 flag .BoolVar (& options .EnableUpload , "upload" , false , "Enable upload via PUT" )
4349 flag .BoolVar (& options .HTTPS , "https" , false , "HTTPS" )
4450 flag .StringVar (& options .TLSCertificate , "cert" , "" , "HTTPS Certificate" )
@@ -49,6 +55,8 @@ func ParseOptions() *Options {
4955 flag .StringVar (& options .Realm , "realm" , "Please enter username and password" , "Realm" )
5056 flag .BoolVar (& options .Version , "version" , false , "Show version of the software" )
5157 flag .BoolVar (& options .Silent , "silent" , false , "Show only results in the output" )
58+ flag .BoolVar (& options .Sandbox , "sandbox" , false , "Enable sandbox mode" )
59+ flag .IntVar (& options .MaxFileSize , "max-file-size" , 50 , "Max Upload File Size" )
5260
5361 flag .Parse ()
5462
0 commit comments