Skip to content

Commit

Permalink
Changes in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
iph0 committed Jun 29, 2018
1 parent 714dd4d commit d3e2d27
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ var (
)

// Processor loads configuration layers from different sources and merges them
// into the one configuration tree. In addition Processor can expand variables
// in string values and process _var and _include directives in resulting
// configuration tree. Processing can be disabled if not needed.
// into the one configuration tree. In addition configuration processor can
// expand variables in string values and process _var and _include directives in
// resulting configuration tree. Processing can be disabled if not needed.
type Processor struct {
config ProcessorConfig
root reflect.Value
Expand All @@ -33,7 +33,8 @@ type Processor struct {
seen map[reflect.Value]bool
}

// ProcessorConfig is a structure with configuration parameters for Processor.
// ProcessorConfig is a structure with configuration parameters for configuration
// processor.
type ProcessorConfig struct {
// Loaders specifies configuration loaders. Map keys reperesents names of
// configuration loaders, that further can be used in configuration locators.
Expand All @@ -48,7 +49,7 @@ type Loader interface {
Load(*Locator) (interface{}, error)
}

// NewProcessor method creates new Processor instance.
// NewProcessor method creates new configuration processor instance.
func NewProcessor(config ProcessorConfig) *Processor {
if config.Loaders == nil {
config.Loaders = make(map[string]Loader)
Expand Down
2 changes: 1 addition & 1 deletion envconf/envconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const errPref = "envconf"
// EnvLoader loads configuration layers from environment variables.
type EnvLoader struct{}

// NewLoader method creates new EnvLoader instance.
// NewLoader method creates new loader instance.
func NewLoader() conf.Loader {
return &EnvLoader{}
}
Expand Down
4 changes: 2 additions & 2 deletions fileconf/fileconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ type FileLoader struct {
dirs []string
}

// NewLoader method creates new FileLoader instance. Method accepts a list of
// directories, in which FileLoader will search configuration files. The merge
// NewLoader method creates new loader instance. Method accepts a list of
// directories, in which the loader will search configuration files. The merge
// priority of loaded configuration layers depends on the order of directories.
// Layers loaded from rightmost directory have highest priority.
func NewLoader(dirs ...string) (conf.Loader, error) {
Expand Down

0 comments on commit d3e2d27

Please sign in to comment.