mirror of
https://github.com/daeuniverse/dae.git
synced 2025-08-04 01:00:02 +07:00
fix: cannot use must in bracket in fallback (#495)
This commit is contained in:
@ -54,6 +54,12 @@ func FunctionOrStringToFunction(fs FunctionOrString) (f *config_parser.Function)
|
|||||||
return &config_parser.Function{Name: fs}
|
return &config_parser.Function{Name: fs}
|
||||||
case *config_parser.Function:
|
case *config_parser.Function:
|
||||||
return fs
|
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:
|
default:
|
||||||
panic(fmt.Sprintf("unknown type of 'fallback' in section routing: %T", fs))
|
panic(fmt.Sprintf("unknown type of 'fallback' in section routing: %T", fs))
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user