mirror of
https://github.com/Hilbis/Hilbish
synced 2025-04-21 13:03:22 +00:00
style: use comma separated cases instead of fallthrough
This commit is contained in:
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…
x
Reference in New Issue
Block a user