Skip to content

Installation

  • Go 1.26 or later
  • github.com/Azure/go-workflow v0.1.13 or later
  • An active Go module (go.mod)

Run this in your project directory:

Terminal window
go get github.com/larsartmann/go-workflow-auditlog@latest
Terminal window
go list -m github.com/larsartmann/go-workflow-auditlog
package main
import (
"context"
"fmt"
flow "github.com/Azure/go-workflow"
"github.com/larsartmann/go-workflow-auditlog"
)
func main() {
audit, _ := auditlog.New(auditlog.Config{
Enabled: true,
WorkflowID: "my-pipeline",
})
w := &flow.Workflow{}
// add your steps...
audit.Attach(w)
_ = w.Do(context.Background())
audit.Snapshot(w)
report := audit.Report()
fmt.Println(report.Summary())
}