-
Notifications
You must be signed in to change notification settings - Fork 839
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
45732a6
commit ebce288
Showing
2 changed files
with
39 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module github.com/Azure/azure-sdk-for-go/sdk/to | ||
|
||
go 1.13 |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// +build go1.13 | ||
|
||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
package to | ||
|
||
// BoolPtr returns a pointer to the provided bool. | ||
func BoolPtr(b bool) *bool { | ||
return &b | ||
} | ||
|
||
// Float32Ptr returns a pointer to the provided float32. | ||
func Float32Ptr(i float32) *float32 { | ||
return &i | ||
} | ||
|
||
// Float64Ptr returns a pointer to the provided float64. | ||
func Float64Ptr(i float64) *float64 { | ||
return &i | ||
} | ||
|
||
// Int32Ptr returns a pointer to the provided int32. | ||
func Int32Ptr(i int32) *int32 { | ||
return &i | ||
} | ||
|
||
// Int64Ptr returns a pointer to the provided int64. | ||
func Int64Ptr(i int64) *int64 { | ||
return &i | ||
} | ||
|
||
// StringPtr returns a pointer to the provided string. | ||
func StringPtr(s string) *string { | ||
return &s | ||
} |