configread

package
v0.13.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(v *viper.Viper) (string, error)

Read returns the value for the given config key.

func Run

func Run(v *viper.Viper)

Run prints the value for the given config key.

Types

type ErrFileRead

type ErrFileRead string

ErrFileRead handles a custom error while reading wakatime config file.

func (ErrFileRead) Error

func (e ErrFileRead) Error() string

Error implements error interface.

type Params

type Params struct {
	Section string
	Key     string
}

Params contains config read parameters.

func LoadParams

func LoadParams(v *viper.Viper) (Params, error)

LoadParams loads needed data from the configuration file.

func (*Params) ViperKey

func (c *Params) ViperKey() string

ViperKey formats to a string [section].[key].

Jump to

Keyboard shortcuts

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