update usage
This commit is contained in:
parent
8a9be9c126
commit
b68e70170e
@ -26,8 +26,8 @@ $ go test -v ./...
|
|||||||
private key password with decrypt usage
|
private key password with decrypt usage
|
||||||
-i file path
|
-i file path
|
||||||
source file path
|
source file path
|
||||||
-o file path
|
-o [file path|-]
|
||||||
output file path
|
output file path or stdout
|
||||||
-k file path
|
-k file path
|
||||||
key file path
|
key file path
|
||||||
```
|
```
|
@ -23,12 +23,13 @@ func RegFlag(f *Flags) {
|
|||||||
flag.BoolVar(&f.Decrypt, "d", false, "decrypt file")
|
flag.BoolVar(&f.Decrypt, "d", false, "decrypt file")
|
||||||
flag.BoolVar(&f.Encrypt, "e", false, "encrypt file")
|
flag.BoolVar(&f.Encrypt, "e", false, "encrypt file")
|
||||||
flag.StringVar(&f.SrcFile, "i", "", "input source `file path`")
|
flag.StringVar(&f.SrcFile, "i", "", "input source `file path`")
|
||||||
flag.StringVar(&f.DstFile, "o", "", "output `file path`")
|
flag.StringVar(&f.DstFile, "o", "", "output `[file path|-]`")
|
||||||
flag.StringVar(&f.KeyFile, "k", "", "key `file path`")
|
flag.StringVar(&f.KeyFile, "k", "", "key `file path`")
|
||||||
flag.BoolVar(&f.Override, "y", false, "if output file exists override")
|
flag.BoolVar(&f.Override, "y", false, "if output file exists override")
|
||||||
flag.StringVar(&f.Password, "p", "", "private key password")
|
flag.StringVar(&f.Password, "p", "", "private key password")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ToMap - flags struct to map
|
||||||
func (f *Flags) ToMap() map[string]interface{} {
|
func (f *Flags) ToMap() map[string]interface{} {
|
||||||
t := reflect.ValueOf(f).Elem()
|
t := reflect.ValueOf(f).Elem()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user