MCPcopy Create free account
hub / github.com/cli/cli / None

Function None

pkg/option/option.go:45–47  ·  view source on GitHub ↗

None instantiates an [Option] with no value.

()

Source from the content-addressed store, hash-verified

43
44// None instantiates an [Option] with no value.
45func None[T any]() Option[T] {
46 return Option[T]{}
47}
48
49func SomeIfNonZero[T comparable](value T) Option[T] {
50 // value is a zero value then return a None

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected