mirror of
https://github.com/hanzo-fi/go-libs.git
synced 2026-10-30 20:53:44 +00:00
17 lines
312 B
Go
17 lines
312 B
Go
package testservice
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/hanzo-fi/go-libs/v5/pkg/service"
|
|
)
|
|
|
|
func DebugInstrumentation(debug bool) Instrumentation {
|
|
return InstrumentationFunc(func(ctx context.Context, cfg *RunConfiguration) error {
|
|
if debug {
|
|
cfg.AppendArgs("--" + service.DebugFlag)
|
|
}
|
|
return nil
|
|
})
|
|
}
|