Skip to content

Commit

Permalink
fix: add the prefix for the aliases when registering the options
Browse files Browse the repository at this point in the history
  • Loading branch information
xgfone committed Aug 29, 2021
1 parent 6a50bf1 commit 1b61728
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions opt_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ func (g *OptGroup) RegisterOpts(opts ...Opt) {
_opts := make([]Opt, len(opts))
for i, opt := range opts {
opt.Name = g.prefix + opt.Name
for i, alias := range opt.Aliases {
opt.Aliases[i] = g.prefix + alias
}
_opts[i] = opt
}
g.config.RegisterOpts(_opts...)
Expand Down

0 comments on commit 1b61728

Please sign in to comment.