parseNamespace parses the namespace from the provided set of params, in this api these params are derived from the url path
(params map[string]string)
| 440 | // parseNamespace parses the namespace from the provided set of params, in this |
| 441 | // api these params are derived from the url path |
| 442 | func parseNamespace(params map[string]string) (string, error) { |
| 443 | namespace, exists := params["namespace"] |
| 444 | if !exists { |
| 445 | return "", ErrNoNamespace |
| 446 | } |
| 447 | |
| 448 | namespace, err := url.PathUnescape(namespace) |
| 449 | if err != nil { |
| 450 | return "", err |
| 451 | } |
| 452 | |
| 453 | return namespace, nil |
| 454 | } |
| 455 | |
| 456 | // parseGroupName parses the group name from the provided set of params, in this |
| 457 | // api these params are derived from the url path |