1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-08-11 17:50:58 +00:00

feat: workflowpattern package (#1618)

* feat: workflowpattern package

* nolint:gocyclo

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
ChristopherHX 2023-02-23 18:21:08 +00:00 committed by GitHub
parent c28143e1f9
commit 75baa9dc3b
3 changed files with 628 additions and 0 deletions

View file

@ -0,0 +1,18 @@
package workflowpattern
import "fmt"
type TraceWriter interface {
Info(string, ...interface{})
}
type EmptyTraceWriter struct{}
func (*EmptyTraceWriter) Info(string, ...interface{}) {
}
type StdOutTraceWriter struct{}
func (*StdOutTraceWriter) Info(format string, args ...interface{}) {
fmt.Printf(format+"\n", args...)
}