Make type check strict

This commit is contained in:
世界
2024-01-03 12:21:46 +08:00
parent 09421b6378
commit 744a5d703b
4 changed files with 9 additions and 3 deletions
+2
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)
}