File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 1
1
package types
2
2
3
- import "mime"
3
+ import (
4
+ "mime"
5
+ )
4
6
5
7
///////////////////////////////////////////////////////////////////////////////
6
8
// GLOBALS
@@ -13,6 +15,7 @@ const (
13
15
ContentTypeCSV = "text/csv"
14
16
ContentTypeTextXml = "text/xml"
15
17
ContentTypeTextPlain = "text/plain"
18
+ ContentTypeFormData = "multipart/form-data"
16
19
ContentTypeAny = "*/*"
17
20
)
18
21
Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ func PtrUint64(v *uint64) uint64 {
33
33
return * v
34
34
}
35
35
36
+ // Int64Ptr returns a pointer to a int64
37
+ func Int64Ptr (v int64 ) * int64 {
38
+ return & v
39
+ }
40
+
36
41
// PtrInt64 returns a int64 from a pointer
37
42
func PtrInt64 (v * int64 ) int64 {
38
43
if v == nil {
Original file line number Diff line number Diff line change 1
1
package types
2
2
3
3
import (
4
+ "strconv"
4
5
"strings"
5
6
"unicode"
6
7
)
@@ -53,3 +54,12 @@ func IsUppercase(s string) bool {
53
54
}
54
55
return true
55
56
}
57
+
58
+ // Unquote returns a string with the input string unquoted
59
+ func Unquote (s string ) string {
60
+ if str , err := strconv .Unquote (s ); err == nil {
61
+ return str
62
+ } else {
63
+ return s
64
+ }
65
+ }
You can’t perform that action at this time.
0 commit comments