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

utils.go 524 B

1234567891011121314151617181920212223242526
  1. // Copyright 2015 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package structs
  5. import (
  6. "net/http"
  7. )
  8. var jsonHeader = http.Header{"content-type": []string{"application/json"}}
  9. // Bool return address of bool value
  10. func Bool(v bool) *bool {
  11. return &v
  12. }
  13. // String return address of string value
  14. func String(v string) *string {
  15. return &v
  16. }
  17. // Int64 return address of int64 value
  18. func Int64(v int64) *int64 {
  19. return &v
  20. }