Documentation ¶ Index ¶ func ValueOf[T Constant[T]]() T type Constant Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func ValueOf ¶ func ValueOf[T Constant[T]]() T ValueOf gives the default value of a constant from its type. It's helpful when constructing constants as variants in a one-of. Note that empty structs are marshalled by default. Usage: constant.ValueOf[constant.Foo]() Types ¶ type Constant ¶ type Constant[T any] interface { Default() T } Source Files ¶ View all Source files constants.go Click to show internal directories. Click to hide internal directories.