Skip to content

Commit d1a05af

Browse files
authored
通用参数优先执行
1 parent b868809 commit d1a05af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Console.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func helpDaemon(val string, c *Console) bool {
4545

4646
// 添加通用参数
4747
func (c *Console) AddBaseOption(param ArgParam) {
48-
c.baseOption = append(c.baseOption, param)
48+
c.baseOption = append([]ArgParam{param}, c.baseOption...)
4949
}
5050

5151
type Command interface {

0 commit comments

Comments
 (0)