aboutsummaryrefslogtreecommitdiffstats
path: root/modules/structs/utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/structs/utils.go')
-rw-r--r--modules/structs/utils.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/structs/utils.go b/modules/structs/utils.go
new file mode 100644
index 0000000000..1b9d689562
--- /dev/null
+++ b/modules/structs/utils.go
@@ -0,0 +1,26 @@
+// Copyright 2015 The Gogs Authors. All rights reserved.
+// Use of this source code is governed by a MIT-style
+// license that can be found in the LICENSE file.
+
+package structs
+
+import (
+ "net/http"
+)
+
+var jsonHeader = http.Header{"content-type": []string{"application/json"}}
+
+// Bool return address of bool value
+func Bool(v bool) *bool {
+ return &v
+}
+
+// String return address of string value
+func String(v string) *string {
+ return &v
+}
+
+// Int64 return address of int64 value
+func Int64(v int64) *int64 {
+ return &v
+}