configread

package
v1.105.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 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(_ context.Context, v *viper.Viper) (int, error)

Run prints the value for the given config key.

Types

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