github.com/akamai/AkamaiOPEN-edgegrid-golang/v8@v8.1.0/pkg/tools/ptr.go (about)

     1  // Package tools contains utilities used in EdgeGrid
     2  package tools
     3  
     4  // BoolPtr returns the address of the bool
     5  func BoolPtr(b bool) *bool {
     6  	return &b
     7  }
     8  
     9  // IntPtr returns the address of the int
    10  func IntPtr(i int) *int {
    11  	return &i
    12  }
    13  
    14  // Int64Ptr returns the address of the int64
    15  func Int64Ptr(i int64) *int64 {
    16  	return &i
    17  }
    18  
    19  // Float32Ptr returns the address of the float32
    20  func Float32Ptr(f float32) *float32 {
    21  	return &f
    22  }
    23  
    24  // Float64Ptr returns the address of the float64
    25  func Float64Ptr(f float64) *float64 {
    26  	return &f
    27  }
    28  
    29  // StringPtr returns the address of the string
    30  func StringPtr(s string) *string {
    31  	return &s
    32  }