config

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package config providies ways to retrieve configurations and such from the user's profile. To use this package correctly one must run `config.SetAppName` first which sets the global appName variable. This value is used to look up application-specific configurations, cache files, etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contents added in v0.4.3

func Contents(file string) (io.Reader, error)

Contents returns an io.Reader with the given configuration file contents.

func EnvOrContents added in v0.4.3

func EnvOrContents(envar, file string) (io.Reader, error)

EnvOrContents returns the environment variable envar or configuration contents of file.

func SetAppName

func SetAppName(name string)

SetAppName sets the global config app name which is used for retrieving specific configuration contents.

Types

This section is empty.

Jump to

Keyboard shortcuts

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