config

package module
v0.0.0-...-d92ec8f Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

README

Config

Config package create a config map with some helper methods.

Precedence

  1. OS ENV
  2. .env file

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Get func(key string) string

Get is a proxy to C().Get

Functions

func Init

func Init()

Init initialize config

Types

type Map

type Map map[string]string

Map represnets config

func C

func C() Map

C gets the global config object

func (Map) Get

func (c Map) Get(key string) string

Get gets a key from config map

func (Map) PrettyPrint

func (c Map) PrettyPrint() string

PrettyPrint prints pretty

func (*Map) Set

func (c *Map) Set(key, value string)

Set sets a key config

Jump to

Keyboard shortcuts

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