Example golang code with using Vault and Cobra
go
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
Vladimir Smagin 78b5e35957 users listing 10 个月前
cmd users listing 10 个月前
keys users listing 10 个月前
vendor users listing 10 个月前
Gopkg.lock users listing 10 个月前
Gopkg.toml users listing 10 个月前
README.md import 11 个月前
main.go import 11 个月前

README.md

Sample

vlad@turtle:/opt/dev/-go/ssh-vault$ go build && ./ssh-vault import --username=nickd --key-public=keys/nick_diamond.pem.pub --key-secret=keys/nick_diamond.pem --name-first=Nick
Error: required flag(s) "name-last" not set
Usage:
  ssh-vault import [flags]

Flags:
  -h, --help                help for import
  -p, --key-public string   Public key file
  -s, --key-secret string   Secret key file
  -f, --name-first string   First name
  -l, --name-last string    Last name
  -u, --username string     User's login

required flag(s) "name-last" not set
vlad@turtle:/opt/dev/-go/ssh-vault$ go build && ./ssh-vault import --username=nickd --key-public=keys/nick_diamond.pem.pub --key-secret=keys/nick_diamond.pem --name-first=Nick --name-last=Diamond
2019/07/03 02:59:52 Importing key pair
2019/07/03 02:59:53 <nil>
vlad@turtle:/opt/dev/-go/ssh-vault$