Skip to content

Commit 97b0bf6

Browse files
committed
Updated server
1 parent 525d408 commit 97b0bf6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pkg/types/ptr.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,19 @@ func BoolPtr(v bool) *bool {
2020
return &v
2121
}
2222

23+
// Int32Ptr returns a pointer to a int32
24+
func Int32Ptr(v int32) *int32 {
25+
return &v
26+
}
27+
28+
// PtrInt32 returns a int32 from a pointer
29+
func PtrInt32(v *int32) int32 {
30+
if v == nil {
31+
return 0
32+
}
33+
return *v
34+
}
35+
2336
// Uint64Ptr returns a pointer to a uint64
2437
func Uint64Ptr(v uint64) *uint64 {
2538
return &v

0 commit comments

Comments
 (0)