Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion scw/convert.go
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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
}