viper

command module
v0.0.0-...-838b099 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 5 Imported by: 0

README

Configurations Loading using Viper and PFlag

An example of implementing configurations in an application using the viper and pflag packages.

  • CLI arguments (top precedence)
  • environment variables
  • configuration file
  • default values

The pflag package can be configured to allow POSIX/GNU style -- flags or the short form flags -.

Setup

<<<<<<< Updated upstream

  1. Build the program.

    $ make
    
  2. Run the program

    $ CYBER_DIRECTORY=env bin/viper --postgres-url=arg
    Dump of config: {true 5000 arg env default}
    

Reference and Credits

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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