aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorAmine <hilalyamine@gmail.com>2019-09-22 11:48:48 +0200
committeramine <hilalyamine@gmail.com>2019-11-09 13:25:07 +0100
commit3433fa5def3fb3c2707bae1aeb4ae1bd62c930de (patch)
tree80722ad58a765e878ebe43dd602607ae0d562ecb /commands
parent967e168333a7c3057cf77f9c3f890ea1bbf7a1df (diff)
downloadgit-bug-3433fa5def3fb3c2707bae1aeb4ae1bd62c930de.tar.gz
commands: use token value as identifier
Diffstat (limited to 'commands')
-rw-r--r--commands/bridge_token.go7
-rw-r--r--commands/bridge_token_add.go2
2 files changed, 3 insertions, 6 deletions
diff --git a/commands/bridge_token.go b/commands/bridge_token.go
index 52dea9a9..cb9754c3 100644
--- a/commands/bridge_token.go
+++ b/commands/bridge_token.go
@@ -59,14 +59,13 @@ func runTokenBridge(cmd *cobra.Command, args []string) error {
for _, token := range tokens {
valueFmt := text.LeftPadMaxLine(token.Value, 20, 0)
- targetFmt := text.LeftPadMaxLine(token.Target, 10, 0)
+ targetFmt := text.LeftPadMaxLine(token.Target, 8, 0)
scopesFmt := text.LeftPadMaxLine(strings.Join(token.Scopes, ","), 20, 0)
- fmt.Printf("%s %s %s %s %s\n",
- colors.Cyan(token.Id),
+ fmt.Printf("%s %s %s %s\n",
+ valueFmt,
colors.Magenta(targetFmt),
colors.Yellow(token.Global),
- valueFmt,
scopesFmt,
)
}
diff --git a/commands/bridge_token_add.go b/commands/bridge_token_add.go
index 8b3fc5ce..1e62a383 100644
--- a/commands/bridge_token_add.go
+++ b/commands/bridge_token_add.go
@@ -34,11 +34,9 @@ var bridgeTokenAddCmd = &cobra.Command{
func init() {
bridgeTokenCmd.AddCommand(bridgeTokenAddCmd)
- bridgeTokenAddCmd.Flags().StringVarP(&bridgeToken.Id, "id", "i", "", "")
bridgeTokenAddCmd.Flags().BoolVarP(&bridgeToken.Global, "global", "g", false, "")
bridgeTokenAddCmd.Flags().StringVarP(&bridgeToken.Value, "value", "v", "", "")
bridgeTokenAddCmd.Flags().StringVarP(&bridgeToken.Target, "target", "t", "", "")
bridgeTokenAddCmd.Flags().StringArrayVarP(&bridgeToken.Scopes, "scopes", "s", []string{}, "")
bridgeTokenAddCmd.Flags().SortFlags = false
-
}