MCPcopy
hub / github.com/grafana/k6 / UnmarshalText

Method UnmarshalText

lib/execution_segment.go:360–367  ·  view source on GitHub ↗

UnmarshalText implements the encoding.TextUnmarshaler interface, so that execution segment sequences can be specified as CLI flags, environment variables, and JSON strings.

(text []byte)

Source from the content-addressed store, hash-verified

358// execution segment sequences can be specified as CLI flags, environment
359// variables, and JSON strings.
360func (ess *ExecutionSegmentSequence) UnmarshalText(text []byte) (err error) {
361 seq, err := NewExecutionSegmentSequenceFromString(string(text))
362 if err != nil {
363 return err
364 }
365 *ess = seq
366 return nil
367}
368
369// MarshalText implements the encoding.TextMarshaler interface, so is used for
370// text and JSON encoding of the execution segment sequences.

Callers

nothing calls this directly

Tested by

no test coverage detected