diff --git a/cmd/signaldctl/cmd/create/account/account.go b/cmd/signaldctl/cmd/create/account/account.go index 90dd1d5..a911a56 100644 --- a/cmd/signaldctl/cmd/create/account/account.go +++ b/cmd/signaldctl/cmd/create/account/account.go @@ -20,7 +20,6 @@ import ( "github.com/spf13/cobra" - "gitlab.com/signald/signald-go/cmd/signaldctl/common" "gitlab.com/signald/signald-go/signald/client-protocol/v0" ) @@ -50,7 +49,7 @@ var ( if actionVerify { actionCount++ } - if actionCount > 1 || (actionCount == 0 && common.OutputFormat != common.OutputFormatInteractive) { + if actionCount > 1 { log.Fatal("invalid arguments: must select exactly one of --request-code, --verify or --link") } diff --git a/cmd/signaldctl/cmd/create/account/link.go b/cmd/signaldctl/cmd/create/account/link.go index b490e4f..a2b5452 100644 --- a/cmd/signaldctl/cmd/create/account/link.go +++ b/cmd/signaldctl/cmd/create/account/link.go @@ -63,7 +63,7 @@ func link() { } else { t.Render() } - case common.OutputFormatInteractive, common.OutputFormatDefault: + case common.OutputFormatQR, common.OutputFormatDefault: qrterminal.Generate(uri.Data.URI, qrterminal.M, os.Stdout) default: log.Fatal("unsupported output format") diff --git a/cmd/signaldctl/common/output-formats.go b/cmd/signaldctl/common/output-formats.go index 3e5aa62..61440ec 100644 --- a/cmd/signaldctl/common/output-formats.go +++ b/cmd/signaldctl/common/output-formats.go @@ -1,10 +1,10 @@ package common const ( - OutputFormatDefault = "default" - OutputFormatCSV = "csv" - OutputFormatTable = "table" - OutputFormatJSON = "json" - OutputFormatYAML = "yaml" - OutputFormatInteractive = "interactive" + OutputFormatDefault = "default" + OutputFormatCSV = "csv" + OutputFormatTable = "table" + OutputFormatJSON = "json" + OutputFormatYAML = "yaml" + OutputFormatQR = "qr" )