flagconfig

package module
v0.0.0-...-22cbba9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2016 License: BSD-3-Clause Imports: 7 Imported by: 4

Documentation

Overview

Package flagconfig provides a flag to specifiy a config file which will in turn be used to read unspecified flag values.

Default configuration file location is $HOME/.config/{executable_name}/config or /etc/conf.d/{executable_name}

Lines in the configuration file should be in flag-name=value format. Comments are allowed in the configuration file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse()

Parse parses the default configuration file and populates the global flags based on the contents of the file.

func ParseFile

func ParseFile(flags *flag.FlagSet, filename string)

ParseFile parses the specified configuration file and populates the flags in the flag.FlagSet based on the contents of the file.

func ParseSet

func ParseSet(flags *flag.FlagSet)

ParseSet parses the default configuraiton file and populates the flags in the flag.FlagSet based on the contents of the file.

func Usage

func Usage()

Usage prints the usage information for the application including all flags and their values after parsing the configuration file

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL