Skip to content

Commit

Permalink
feat: add scw.IPPtr (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinBrosse authored Oct 7, 2019
1 parent 1e1dbdb commit 2b0ce7d
Showing 1 changed file with 9 additions and 1 deletion.
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
}

0 comments on commit 2b0ce7d

Please sign in to comment.