gitlab.com/evatix-go/core@v1.3.55/core.go (about)

     1  package core
     2  
     3  func EmptyAnysPtr() *[]interface{} {
     4  	return &([]interface{}{})
     5  }
     6  
     7  func EmptyFloat32Ptr() *[]float32 {
     8  	return &([]float32{})
     9  }
    10  
    11  func EmptyFloat64Ptr() *[]float64 {
    12  	return &([]float64{})
    13  }
    14  
    15  func EmptyBoolsPtr() *[]bool {
    16  	return &([]bool{})
    17  }
    18  
    19  func EmptyIntsPtr() *[]int {
    20  	return &([]int{})
    21  }
    22  
    23  func EmptyBytePtr() *[]byte {
    24  	return &([]byte{})
    25  }
    26  
    27  func EmptyStringsMapPtr() *map[string]string {
    28  	return &(map[string]string{})
    29  }
    30  
    31  func EmptyStringToIntMapPtr() *map[string]int {
    32  	return &(map[string]int{})
    33  }
    34  
    35  func EmptyStringsPtr() *[]string {
    36  	return &([]string{})
    37  }
    38  
    39  func EmptyPointerStringsPtr() *[]*string {
    40  	return &([]*string{})
    41  }
    42  
    43  func StringsPtrByLength(length int) *[]string {
    44  	list := make([]string, length)
    45  
    46  	return &(list)
    47  }
    48  
    49  func StringsPtrByCapacity(length, cap int) *[]string {
    50  	list := make([]string, length, cap)
    51  
    52  	return &(list)
    53  }
    54  
    55  func PointerStringsPtrByCapacity(length, cap int) *[]*string {
    56  	list := make([]*string, length, cap)
    57  
    58  	return &(list)
    59  }