Change the loading resource order
This commit is contained in:
parent
dd62051e6c
commit
4d44ab9628
4 changed files with 9 additions and 3 deletions
|
@ -12,6 +12,10 @@ type FlagLoader struct{}
|
|||
|
||||
// Load loads the command's configuration from flag arguments.
|
||||
func (*FlagLoader) Load(args []string, cmd *Command) (bool, error) {
|
||||
if len(args) == 0 {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
if err := flag.Decode(args, cmd.Configuration); err != nil {
|
||||
return false, fmt.Errorf("failed to decode configuration from flags: %v", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue