MCPcopy
hub / github.com/genuinetools/img / WithValidator

Method WithValidator

cli.go:75–78  ·  view source on GitHub ↗

WithValidator returns the listValue with validator set.

(validator validatorFunc)

Source from the content-addressed store, hash-verified

73
74// WithValidator returns the listValue with validator set.
75func (opts *listValue) WithValidator(validator validatorFunc) *listValue {
76 opts.validator = validator
77 return opts
78}
79
80// validatorFunc defines a validator function that returns a validated string and/or an error.
81type validatorFunc func(val string) (string, error)

Callers 1

newBuildCommandFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected