MCPcopy Create free account
hub / github.com/MacroPower/kat / NewOutput

Function NewOutput

pkg/command/command.go:48–58  ·  view source on GitHub ↗

NewOutput creates a new [Output] timestamped with the current time.

(t Type, opts ...OutputOpt)

Source from the content-addressed store, hash-verified

46
47// NewOutput creates a new [Output] timestamped with the current time.
48func NewOutput(t Type, opts ...OutputOpt) Output {
49 o := &Output{
50 Type: t,
51 Timestamp: time.Now(),
52 }
53 for _, opt := range opts {
54 opt(o)
55 }
56
57 return *o
58}
59
60type OutputOpt func(*Output)
61

Callers 6

RunPluginContextMethod · 0.85
RunOnEventMethod · 0.85
flushFileEventsMethod · 0.85
RunContextMethod · 0.85
RunContextMethod · 0.85
RunPluginContextMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected