1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-03-03 15:22:30 +02:00
2021-10-12 12:55:53 +01:00

20 lines
340 B
Go

package pkger
import (
"context"
"go-micro.dev/v4/config/source"
)
type pkgerPathKey struct{}
// WithPath sets the path to pkger
func WithPath(p string) source.Option {
return func(o *source.Options) {
if o.Context == nil {
o.Context = context.Background()
}
o.Context = context.WithValue(o.Context, pkgerPathKey{}, p)
}
}