Skip to content

Commit

Permalink
fix: cannot use must in bracket in fallback (daeuniverse#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
mzz2017 authored Apr 8, 2024
1 parent 605f005 commit c1a7a64
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ func FunctionOrStringToFunction(fs FunctionOrString) (f *config_parser.Function)
return &config_parser.Function{Name: fs}
case *config_parser.Function:
return fs
case []*config_parser.Function:
if len(fs) == 1 {
return fs[0]
} else {
panic(fmt.Sprintf("unknown type of 'fallback' in section routing: %T", fs))
}
default:
panic(fmt.Sprintf("unknown type of 'fallback' in section routing: %T", fs))
}
Expand Down

0 comments on commit c1a7a64

Please sign in to comment.