(proto string)
| 197 | } |
| 198 | |
| 199 | func isValidProto(proto string) bool { |
| 200 | if proto == "" { |
| 201 | return false |
| 202 | } |
| 203 | for _, p := range []string{"http", "https", "ws", "wss"} { |
| 204 | if strings.EqualFold(proto, p) { |
| 205 | return true |
| 206 | } |
| 207 | } |
| 208 | return false |
| 209 | } |
| 210 | |
| 211 | // Scheme returns the HTTP protocol scheme, `http` or `https`. |
| 212 | func (c *Context) Scheme() string { |
no outgoing calls
no test coverage detected
searching dependent graphs…