diff --git a/scw/convert.go b/scw/convert.go index 650354ca5..74864b340 100644 --- a/scw/convert.go +++ b/scw/convert.go @@ -1,6 +1,9 @@ package scw -import "time" +import ( + "net" + "time" +) // StringPtr returns a pointer to the string value passed in. func StringPtr(v string) *string { @@ -161,3 +164,8 @@ func DurationPtr(v time.Duration) *time.Duration { func SizePtr(v Size) *Size { return &v } + +// IPPtr returns a pointer to the net.IP value passed in. +func IPPtr(v net.IP) *net.IP { + return &v +}