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

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