config

package
v3.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Config is used for reading a config file and flags. Inspired from spf13/viper.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(key string) string

Get has the behavior of returning the value associated with the first place from where it is set. Get will check value in the following order: flag, config file.

Get returns a string. For a specific value you can use one of the Get____ methods.

func GetDLFolder

func GetDLFolder() string

GetPermalink returns the value associated with the key "dl_folder". If key "dl_folder" is blank in config, then it returns path to home directory.

func GetItunesPlaylist

func GetItunesPlaylist() string

GetItunesPlaylist returns the value associated with the key "itunes_playlist". If the OS of this computer isn't macOS, then it returns blank string.

func GetPermalink() string

GetPermalink returns the value associated with the key "permalink". It guarantees that will be returned non-blank string.

func Set

func Set(key, value string)

Sets the value for the key in the override regiser.

Types

This section is empty.

Jump to

Keyboard shortcuts

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