style: use comma separated cases instead of fallthrough

lua5.4
TorchedSammy 2022-03-29 20:57:05 -04:00
parent 3bea73460a
commit ad183a7208
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 1 additions and 5 deletions

6
api.go
View File

@ -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