I have following code that compiler complain.
switch req.Method {
case "POST" || "PUT" || "DELETE":
if req.Header.Get("Content-Type") != "application/json" {
return handleErr(req)
}
}
Compiler error message
..\..\controllersoutes\header.go:59: invalid operation: "POST" || "PUT" (operator || not defined on string)
Do I use OR operator in wrong way?