Make type check strict

This commit is contained in:
世界
2023-12-05 19:09:13 +08:00
parent bc2d73b2d6
commit 2f4f4e18ee
4 changed files with 9 additions and 3 deletions

View File

@@ -119,6 +119,8 @@ func (h *Outbound) UnmarshalJSON(bytes []byte) error {
v = &h.SelectorOptions
case C.TypeURLTest:
v = &h.URLTestOptions
case "":
return E.New("missing outbound type")
default:
return E.New("unknown outbound type: ", h.Type)
}