remove interactive output type

This commit is contained in:
Finn 2021-01-31 05:06:09 -08:00
parent c824084ea9
commit 9143f54783
3 changed files with 8 additions and 9 deletions

View file

@ -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")
}

View file

@ -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")

View file

@ -6,5 +6,5 @@ const (
OutputFormatTable = "table"
OutputFormatJSON = "json"
OutputFormatYAML = "yaml"
OutputFormatInteractive = "interactive"
OutputFormatQR = "qr"
)