本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 line
495B

  1. package runtime
  2. // Values typically represent parameters on a http request.
  3. type Values map[string][]string
  4. // GetOK returns the values collection for the given key.
  5. // When the key is present in the map it will return true for hasKey.
  6. // When the value is not empty it will return true for hasValue.
  7. func (v Values) GetOK(key string) (value []string, hasKey bool, hasValue bool) {
  8. value, hasKey = v[key]
  9. if !hasKey {
  10. return
  11. }
  12. if len(value) == 0 {
  13. return
  14. }
  15. hasValue = true
  16. return
  17. }
上海开阖软件有限公司 沪ICP备12045867号-1