mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-03-03 18:30:20 +00:00
22 lines
329 B
Go
22 lines
329 B
Go
package workflowpattern
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
type TraceWriter interface {
|
|
Info(string, ...any)
|
|
}
|
|
|
|
type EmptyTraceWriter struct{}
|
|
|
|
func (*EmptyTraceWriter) Info(string, ...any) {
|
|
}
|
|
|
|
type StdOutTraceWriter struct{}
|
|
|
|
func (*StdOutTraceWriter) Info(format string, args ...any) {
|
|
fmt.Fprintf(os.Stdout, format+"\n", args...)
|
|
}
|