mirror of
https://github.com/status-im/keycard-cli.git
synced 2025-02-28 20:00:38 +00:00
add version command
This commit is contained in:
parent
ae4aeeafc4
commit
0bb56e9716
8
main.go
8
main.go
@ -15,6 +15,8 @@ import (
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
)
|
||||
|
||||
const version = "0.0.2"
|
||||
|
||||
type commandFunc func(*scard.Card) error
|
||||
|
||||
var (
|
||||
@ -45,6 +47,7 @@ func initLogger() {
|
||||
|
||||
func init() {
|
||||
commands = map[string]commandFunc{
|
||||
"version": commandVersion,
|
||||
"install": commandInstall,
|
||||
"info": commandInfo,
|
||||
"delete": commandDelete,
|
||||
@ -204,6 +207,11 @@ func askInt(description string) int {
|
||||
return int(i)
|
||||
}
|
||||
|
||||
func commandVersion(card *scard.Card) error {
|
||||
fmt.Printf("version %+v\n", version)
|
||||
return nil
|
||||
}
|
||||
|
||||
func commandInstall(card *scard.Card) error {
|
||||
if *flagCapFile == "" {
|
||||
logger.Error("you must specify a cap file path with the -f flag\n")
|
||||
|
Loading…
x
Reference in New Issue
Block a user