Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Pointer ¶
func Pointer[T any](v T) *T
Pointer returns the passed value as a pointer. This is particularly useful in cases where you need to pass a pointer to a given func input, for example:
&helix.ModifyChannelInformation{ Title: twitch.Pointer("my new title"), }
func PointerValue ¶
func PointerValue[T any](v *T) T
Pointer returns the passed value as a pointer. This is particularly useful in cases where you need to pass a pointer to a given func input, for example:
value := "string" valuePointer := &value log.Println(twitch.PointerValue(valuePointer)) // returns "string" valuePointer = nil // set it to nil log.Println(twitch.PointerValue(valuePointer)) // returns ""
Types ¶
Click to show internal directories.
Click to hide internal directories.