Categorygithub.com/ardanlabs/conf/v2
modulepackage
2.2.0
Repository: https://github.com/ardanlabs/conf.git
Documentation: pkg.go.dev

# README

Conf

CircleCI

Copyright 2018, 2019, 2020, 2021, Ardan Labs
[email protected]

Licensing

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About The Project

Package conf provides support for using environmental variables and command line arguments for configuration.

All of the documentation can be found on the go.dev website.

# Packages

Package yaml provides yaml support for conf.

# Functions

Parse parses the specified config struct.
String returns a stringified version of the provided conf-tagged struct, minus any fields tagged with `noprint`.
UsageInfo provides output to display the config usage on the command line.
VersionInfo provides output to display the application version and description on the command line.

# Variables

ErrHelpWanted provides an indication help was requested.
ErrInvalidStruct indicates that a configuration struct is not the correct type.

# Structs

Field maintains information about a field in the configuration struct.
A FieldError occurs when an error occurs updating an individual field in the provided struct value.
FieldOptions maintain flag options for a given field.
Version provides the abitily to add version and description to the application.

# Interfaces

Parsers declare behavior to extend the different parsers that can be used to unmarshal config.
Setter is implemented by types can self-deserialize values.

# Type aliases

Args holds command line arguments after flags have been parsed.