From 6dfaf3a3ca9d2467c487428f64ed07ebdf1ab90f Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 14 Apr 2021 11:39:44 +0200 Subject: [PATCH] fix flag name --- cmd/insert-user/main.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/cmd/insert-user/main.go b/cmd/insert-user/main.go index 0d5f5c0..6fe3062 100644 --- a/cmd/insert-user/main.go +++ b/cmd/insert-user/main.go @@ -14,15 +14,13 @@ import ( "strings" "syscall" - refs "go.mindeco.de/ssb-refs" - - "github.com/ssb-ngi-pointer/go-ssb-room/internal/repo" - "github.com/ssb-ngi-pointer/go-ssb-room/roomdb" - _ "github.com/mattn/go-sqlite3" "golang.org/x/crypto/ssh/terminal" + "github.com/ssb-ngi-pointer/go-ssb-room/internal/repo" + "github.com/ssb-ngi-pointer/go-ssb-room/roomdb" "github.com/ssb-ngi-pointer/go-ssb-room/roomdb/sqlite" + refs "go.mindeco.de/ssb-refs" ) func main() { @@ -67,10 +65,10 @@ func main() { }) flag.Parse() - /* we require at least 5 arguments: + -name + -key */ + /* we require at least 5 arguments: + -login + -key */ /* 1 2 3 4 5 */ if len(os.Args) < 5 { - cliMissingArguments("please provide the default arguments -name and -key") + cliMissingArguments("please provide the default arguments -login and -key") } if login == "" { @@ -112,7 +110,7 @@ func main() { func cliMissingArguments(message string) { executable := strings.TrimPrefix(os.Args[0], "./") - fmt.Fprintf(os.Stderr, "%s: %s\nusage:%s -name -key <@.ed25519> \n", executable, message, executable) + fmt.Fprintf(os.Stderr, "%s: %s\nusage:%s -login -key <@.ed25519> \n", executable, message, executable) flag.Usage() os.Exit(1) }