-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: rename functions in pointer package (#25)
This PR changes the function names in the pointer package so they sound better when called.
- Loading branch information
1 parent
909ac5b
commit 4265633
Showing
3 changed files
with
29 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
// Package pointer provides pointer helper functions. | ||
package pointer | ||
|
||
// IntPtr returns the pointer of the int input. | ||
func IntPtr(i int) *int { | ||
// Int returns the pointer of the int input. | ||
func Int(i int) *int { | ||
return &i | ||
} | ||
|
||
// Int32Ptr returns the pointer of the int32 input. | ||
func Int32Ptr(i int32) *int32 { | ||
// Int32 returns the pointer of the int32 input. | ||
func Int32(i int32) *int32 { | ||
return &i | ||
} | ||
|
||
// Int64Ptr returns the pointer of the int64 input. | ||
func Int64Ptr(i int64) *int64 { | ||
// Int64 returns the pointer of the int64 input. | ||
func Int64(i int64) *int64 { | ||
return &i | ||
} | ||
|
||
// Float32Ptr returns the pointer of the float32 input. | ||
func Float32Ptr(f float32) *float32 { | ||
// Float32 returns the pointer of the float32 input. | ||
func Float32(f float32) *float32 { | ||
return &f | ||
} | ||
|
||
// Float64Ptr returns the pointer of the float64 input. | ||
func Float64Ptr(f float64) *float64 { | ||
// Float64 returns the pointer of the float64 input. | ||
func Float64(f float64) *float64 { | ||
return &f | ||
} | ||
|
||
// BoolPtr returns the pointer of the bool input. | ||
func BoolPtr(b bool) *bool { | ||
// Bool returns the pointer of the bool input. | ||
func Bool(b bool) *bool { | ||
return &b | ||
} | ||
|
||
// StringPtr returns the pointer of the string input. | ||
func StringPtr(s string) *string { | ||
// String returns the pointer of the string input. | ||
func String(s string) *string { | ||
return &s | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters