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

Function Some

pkg/option/option.go:40–42  ·  view source on GitHub ↗

Some instantiates an [Option] with a value.

(value T)

Source from the content-addressed store, hash-verified

38
39// Some instantiates an [Option] with a value.
40func Some[T any](value T) Option[T] {
41 return Option[T]{value, true}
42}
43
44// None instantiates an [Option] with no value.
45func None[T any]() Option[T] {

Callers 2

SomeIfNonZeroFunction · 0.85
MapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected