update usage

This commit is contained in:
Jay 2018-03-13 16:40:54 +08:00
parent 8a9be9c126
commit b68e70170e
2 changed files with 4 additions and 3 deletions

View File

@ -26,8 +26,8 @@ $ go test -v ./...
private key password with decrypt usage
-i file path
source file path
-o file path
output file path
-o [file path|-]
output file path or stdout
-k file path
key file path
```

View File

@ -23,12 +23,13 @@ func RegFlag(f *Flags) {
flag.BoolVar(&f.Decrypt, "d", false, "decrypt file")
flag.BoolVar(&f.Encrypt, "e", false, "encrypt file")
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.BoolVar(&f.Override, "y", false, "if output file exists override")
flag.StringVar(&f.Password, "p", "", "private key password")
}
// ToMap - flags struct to map
func (f *Flags) ToMap() map[string]interface{} {
t := reflect.ValueOf(f).Elem()