MCPcopy Create free account
hub / github.com/brimdata/super / Opt

Function Opt

vector/record.go:212–220  ·  view source on GitHub ↗
(vec Any)

Source from the content-addressed store, hash-verified

210}
211
212func Opt(vec Any) Any {
213 switch vec := vec.(type) {
214 case *Optional:
215 return vec.Dynamic
216 case *None:
217 return vec.Error
218 }
219 return vec
220}
221
222// OptType returns the type of `v` preventing None values from expressing
223// themselves as missing and instead retuning the type bound to that None.

Callers 2

CallMethod · 0.92
PullMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected