Skip to content

Commit 33a1e09

Browse files
authored
add shorthand endpoint flag for oss (#1303)
1 parent f21c290 commit 33a1e09

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

config/flags.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,11 +550,12 @@ func NewEndpointFlag() *cli.Flag {
550550
return &cli.Flag{
551551
Category: "config",
552552
Name: EndpointFlagName,
553+
Shorthand: 'e',
553554
AssignedMode: cli.AssignedOnce,
554555
Persistent: true,
555556
Short: i18n.T(
556-
"use `--endpoint <endpoint>` to assign endpoint",
557-
"使用 `--endpoint <endpoint>` 来指定接入点地址"),
557+
"use `--endpoint`/`-e <endpoint>` to assign endpoint",
558+
"使用 `--endpoint`/`-e <endpoint>` 来指定接入点地址"),
558559
}
559560
}
560561

config/flags_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ func TestEndpointTypeFlag(t *testing.T) {
485485
func TestNewEndpointFlag(t *testing.T) {
486486
var a = NewEndpointFlag()
487487
assert.Equal(t, EndpointFlagName, a.Name)
488+
assert.Equal(t, 'e', a.Shorthand)
488489
assert.Equal(t, "config", a.Category)
489490
assert.True(t, a.Persistent)
490491
assert.Equal(t, cli.AssignedOnce, a.AssignedMode)

0 commit comments

Comments
 (0)