github.com/micro/go-micro/v2@v2.9.1/config/loader/memory/options.go (about)

     1  package memory
     2  
     3  import (
     4  	"github.com/micro/go-micro/v2/config/loader"
     5  	"github.com/micro/go-micro/v2/config/reader"
     6  	"github.com/micro/go-micro/v2/config/source"
     7  )
     8  
     9  // WithSource appends a source to list of sources
    10  func WithSource(s source.Source) loader.Option {
    11  	return func(o *loader.Options) {
    12  		o.Source = append(o.Source, s)
    13  	}
    14  }
    15  
    16  // WithReader sets the config reader
    17  func WithReader(r reader.Reader) loader.Option {
    18  	return func(o *loader.Options) {
    19  		o.Reader = r
    20  	}
    21  }