-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathhelpers.go
58 lines (56 loc) · 922 Bytes
/
helpers.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package pgxscan
import "time"
func uintToPtr(v uint) *uint {
return &v
}
func uint8ToPtr(v uint8) *uint8 {
return &v
}
func uint16ToPtr(v uint16) *uint16 {
return &v
}
func uint32ToPtr(v uint32) *uint32 {
return &v
}
func uint64ToPtr(v uint64) *uint64 {
return &v
}
func intToPtr(v int) *int {
return &v
}
func int8ToPtr(v int8) *int8 {
return &v
}
func int16ToPtr(v int16) *int16 {
return &v
}
func int32ToPtr(v int32) *int32 {
return &v
}
func int64ToPtr(v int64) *int64 {
return &v
}
func byteToPtr(v []byte) *[]byte {
return &v
}
func float32ToPtr(v float32) *float32 {
return &v
}
func float64ToPtr(v float64) *float64 {
return &v
}
func complex64ToPtr(v complex64) *complex64 {
return &v
}
func complex128ToPtr(v complex128) *complex128 {
return &v
}
func boolToPtr(v bool) *bool {
return &v
}
func stringToPtr(v string) *string {
return &v
}
func timeToPtr(v time.Time) *time.Time {
return &v
}