Skip to content

Commit 2b0ce7d

Browse files
feat: add scw.IPPtr (#200)
1 parent 1e1dbdb commit 2b0ce7d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

scw/convert.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package scw
22

3-
import "time"
3+
import (
4+
"net"
5+
"time"
6+
)
47

58
// StringPtr returns a pointer to the string value passed in.
69
func StringPtr(v string) *string {
@@ -161,3 +164,8 @@ func DurationPtr(v time.Duration) *time.Duration {
161164
func SizePtr(v Size) *Size {
162165
return &v
163166
}
167+
168+
// IPPtr returns a pointer to the net.IP value passed in.
169+
func IPPtr(v net.IP) *net.IP {
170+
return &v
171+
}

0 commit comments

Comments
 (0)