1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-07-06 22:35:51 +02:00
Files
go-micro/plugins/config/source/pkger/options.go

20 lines
340 B
Go
Raw Normal View History

2020-12-26 15:32:45 +00:00
package pkger
import (
"context"
2021-10-12 12:55:53 +01:00
"go-micro.dev/v4/config/source"
2020-12-26 15:32:45 +00:00
)
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)
}
}