(prefix string)
| 253 | } |
| 254 | |
| 255 | func (hl *handlerLoader) GetHandler(prefix string) (interface{}, error) { |
| 256 | hl.setupHandler(prefix) |
| 257 | if s, ok := hl.handler[prefix].(blobserver.Storage); ok { |
| 258 | return s, nil |
| 259 | } |
| 260 | if h, ok := hl.handler[prefix].(http.Handler); ok { |
| 261 | return h, nil |
| 262 | } |
| 263 | return nil, fmt.Errorf("bogus http or storage handler referenced as %q", prefix) |
| 264 | } |
| 265 | |
| 266 | func (hl *handlerLoader) GetHandlerType(prefix string) string { |
| 267 | return hl.configType(prefix) |
no test coverage detected