Skip to content

Commit 81269fc

Browse files
committed
feat: add db and lb aliases to database and loadbalancer, respectively
1 parent 7ab7b61 commit 81269fc

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111
- Add `database list`, `database show`,`database plans`, and `database types` commands.
1212
- Add `loadbalancer list` and `loadbalancer show` commands.
13+
- Add `db` and `lb` aliases to `database` and `loadbalancer`, respectively.
1314

1415
### Changed
1516
- Color server state in `server list` output similarly than in `server show` output.

internal/commands/database/database.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@ func BaseDatabaseCommand() commands.Command {
1414
type databaseCommand struct {
1515
*commands.BaseCommand
1616
}
17+
18+
// InitCommand implements Command.InitCommand
19+
func (db *databaseCommand) InitCommand() {
20+
db.Cobra().Aliases = []string{"db"}
21+
}

internal/commands/loadbalancer/loadbalancer.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@ func BaseLoadBalancerCommand() commands.Command {
1414
type loadbalancerCommand struct {
1515
*commands.BaseCommand
1616
}
17+
18+
// InitCommand implements Command.InitCommand
19+
func (lb *loadbalancerCommand) InitCommand() {
20+
lb.Cobra().Aliases = []string{"lb"}
21+
}

0 commit comments

Comments
 (0)