MCPcopy
hub / github.com/cloudfoundry/cli / OptionalObject

Struct OptionalObject

types/optional_object.go:9–12  ·  view source on GitHub ↗

OptionalObject is for situations where we want to differentiate between an empty object, and the object not having been set. An example would be an optional command line option where we want to tell the difference between it being set to an empty object, and it not being specified at all.

Source from the content-addressed store, hash-verified

7// optional command line option where we want to tell the difference between
8// it being set to an empty object, and it not being specified at all.
9type OptionalObject struct {
10 IsSet bool
11 Value map[string]interface{}
12}
13
14func NewOptionalObject(v map[string]interface{}) OptionalObject {
15 if v == nil {

Callers 5

ExecuteMethod · 0.92
ExecuteMethod · 0.92
ExecuteMethod · 0.92
ExecuteMethod · 0.92
ExecuteMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected