syslib

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 13 Imported by: 3

Documentation

Overview

Package syslib provides functionalities that are specific for the standard Go runtime system, i.e. that cannot be used e.g. with gopherjs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(home, path, name string) m.Map

LoadConfig loads the application configuration from the .yaml file given.

func SetupEnv

func SetupEnv() (string, m.Map, b.Logger)

func SetupTestEnv

func SetupTestEnv() (string, m.Map, b.Logger)

func SetupTestEnvConfig added in v0.1.13

func SetupTestEnvConfig(cfgName string) (string, m.Map, b.Logger)

Types

type Logger

type Logger struct {
	MaxLevel                    l.Level
	TracebackSkip, TracebackLen int
	// contains filtered or unexported fields
}

func LoadLoggerConf

func LoadLoggerConf(home, lpath string) *Logger

func (*Logger) GetMaxLevel

func (logger *Logger) GetMaxLevel() l.Level

func (*Logger) Log

func (logger *Logger) Log(lvl l.Level, txt string, fields m.Map)

func (*Logger) SetMaxLevel

func (logger *Logger) SetMaxLevel(level l.Level)

type VarsMap

type VarsMap map[string]string

func (VarsMap) Get

func (vm VarsMap) Get(key string) (string, bool)

func (VarsMap) Set

func (vm VarsMap) Set(key, value string)

Jump to

Keyboard shortcuts

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