Skip to content

Commit

Permalink
add pointer helper methods
Browse files Browse the repository at this point in the history
  • Loading branch information
asobrien committed Jan 22, 2020
1 parent e088bc5 commit 2767792
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions fastly/fastly.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,18 @@ func (b *Compatibool) UnmarshalText(t []byte) error {
}
return nil
}

// String is a helper that returns a pointer to the string value passed in.
func String(v string) *string {
return &v
}

// Uint is a helper that returns a pointer to the uint value passed in.
func Uint(v uint) *uint {
return &v
}

// Bool is a helper that returns a pointer to the bool value passed in.
func Bool(v bool) *bool {
return &v
}

0 comments on commit 2767792

Please sign in to comment.