12 lines
129 B
Go
12 lines
129 B
Go
package typeutils
|
|
|
|
type Optional[T any] struct {
|
|
value T
|
|
present bool
|
|
}
|
|
|
|
type Result[T any] struct {
|
|
value T
|
|
err error
|
|
}
|