1 package playwright 2 3 // String is a helper routine that allocates a new string value 4 // to store v and returns a pointer to it. 5 func String(v string) *string { 6 return &v 7 } 8 9 // Bool is a helper routine that allocates a new bool value 10 // to store v and returns a pointer to it. 11 func Bool(v bool) *bool { 12 return &v 13 } 14 15 // Int is a helper routine that allocates a new int32 value 16 // to store v and returns a pointer to it. 17 func Int(v int) *int { 18 return &v 19 } 20 21 // Float is a helper routine that allocates a new float64 value 22 // to store v and returns a pointer to it. 23 func Float(v float64) *float64 { 24 return &v 25 } 26 27 // Null will be used in certain scenarios where a strict nil pointer 28 // check is not possible 29 func Null() interface{} { 30 return "PW_NULL" 31 } 32 33 // StringSlice is a helper routine that allocates a new StringSlice value 34 // to store v and returns a pointer to it. 35 func StringSlice(v ...string) *[]string { 36 var o []string 37 o = append(o, v...) 38 return &o 39 } 40 41 // IntSlice is a helper routine that allocates a new IntSlice value 42 // to store v and returns a pointer to it. 43 func IntSlice(v ...int) *[]int { 44 var o []int 45 o = append(o, v...) 46 return &o 47 } 48