github.com/machinefi/w3bstream@v1.6.5-rc9.0.20240426031326-b8c7c4876e72/pkg/depends/x/ptrx/ptrx.go (about)

     1  // Package ptrx used for inline point value
     2  package ptrx
     3  
     4  import "time"
     5  
     6  // Deprecated: use Ptr instead. if your go version greater than 1.18
     7  func Bool(v bool) *bool { return &v }
     8  
     9  // Deprecated: use Ptr instead. if your go version greater than 1.18
    10  func Int(v int) *int { return &v }
    11  
    12  // Deprecated: use Ptr instead. if your go version greater than 1.18
    13  func Int8(v int8) *int8 { return &v }
    14  
    15  // Deprecated: use Ptr instead. if your go version greater than 1.18
    16  func Int16(v int16) *int16 { return &v }
    17  
    18  // Deprecated: use Ptr instead. if your go version greater than 1.18
    19  func Int32(v int32) *int32 { return &v }
    20  
    21  // Deprecated: use Ptr instead. if your go version greater than 1.18
    22  func Int64(v int64) *int64 { return &v }
    23  
    24  // Deprecated: use Ptr instead. if your go version greater than 1.18
    25  func Uint(v uint) *uint { return &v }
    26  
    27  // Deprecated: use Ptr instead. if your go version greater than 1.18
    28  func Uint8(v uint8) *uint8 { return &v }
    29  
    30  // Deprecated: use Ptr instead. if your go version greater than 1.18
    31  func Uint16(v uint16) *uint16 { return &v }
    32  
    33  // Deprecated: use Ptr instead. if your go version greater than 1.18
    34  func Uint32(v uint32) *uint32 { return &v }
    35  
    36  // Deprecated: use Ptr instead. if your go version greater than 1.18
    37  func Uint64(v uint64) *uint64 { return &v }
    38  
    39  // Deprecated: use Ptr instead. if your go version greater than 1.18
    40  func Float32(v float32) *float32 { return &v }
    41  
    42  // Deprecated: use Ptr instead. if your go version greater than 1.18
    43  func Float64(v float64) *float64 { return &v }
    44  
    45  // Deprecated: use Ptr instead. if your go version greater than 1.18
    46  func Byte(v byte) *byte { return &v }
    47  
    48  // Deprecated: use Ptr instead. if your go version greater than 1.18
    49  func Rune(v rune) *rune { return &v }
    50  
    51  // Deprecated: use Ptr instead. if your go version greater than 1.18
    52  func String(v string) *string { return &v }
    53  
    54  // Deprecated: use Ptr instead. if your go version greater than 1.18
    55  func Duration(d time.Duration) *time.Duration { return &d }
    56  
    57  func Ptr[V any](v V) *V { return &v }