config

package
v0.0.0-...-5ecafbf Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigPath string

ConfigPath is a path to a non default config.ini file

Functions

func GetConfigValue

func GetConfigValue(section string, key string, defaultValue ...string) string

GetConfigValue returns a value from the config.ini file as a string. It is possible to set a default value as a third argument.

func GetToken

func GetToken() string

GetToken returns the sourcehut API token

func GetURL

func GetURL(service string) string

GetURL returns a formatted url for a service

func InitConfig

func InitConfig()

InitConfig gets called by cobra and only calls LoadConfig.

func LoadConfig

func LoadConfig() *ini.File

LoadConfig parses the config.ini file and returns it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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