base-golang/pkg/database/trace.go

24 lines
331 B
Go
Raw Normal View History

2024-07-23 10:23:43 +08:00
package database
2024-07-31 16:49:14 +08:00
import "gitea.bvbej.com/bvbej/base-golang/pkg/trace"
2024-07-23 10:23:43 +08:00
type Trace = trace.T
type Option func(*option)
func WithTrace(t Trace) Option {
return func(opt *option) {
if t != nil {
opt.Trace = t.(*trace.Trace)
}
}
}
func newOption() *option {
return &option{}
}
type option struct {
Trace *trace.Trace
}