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:
parent
c28143e1f9
commit
75baa9dc3b
3 changed files with 628 additions and 0 deletions
18
act/workflowpattern/trace_writer.go
Normal file
18
act/workflowpattern/trace_writer.go
Normal 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...)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue