mirror of https://github.com/Hilbis/Hilbish
style: use comma separated cases instead of fallthrough
parent
3bea73460a
commit
ad183a7208
6
api.go
6
api.go
|
@ -564,11 +564,7 @@ func hlrunnerMode(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
|
|||
case rt.StringType:
|
||||
switch mode.AsString() {
|
||||
// no fallthrough doesnt work so eh
|
||||
case "hybrid": fallthrough
|
||||
case "hybridRev": fallthrough
|
||||
case "lua": fallthrough
|
||||
case "sh":
|
||||
runnerMode = mode
|
||||
case "hybrid", "hybridRev", "lua", "sh": runnerMode = mode
|
||||
default: return nil, errors.New("execMode: expected either a function or hybrid, hybridRev, lua, sh. Received " + mode.AsString())
|
||||
}
|
||||
case rt.FunctionType: runnerMode = mode
|
||||
|
|
Loading…
Reference in New Issue