scurvy

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2020 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

scurvy

Scurvy is a thin io/log wrapper

Documentation

Overview

Package scurvy contains common utility functions.

Package scurvy contains common utility functions.

Package scurvy contains common utility functions.

Package scurvy contains common utility functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	IsSet(ns, key string) bool

	GetBool(ns, key string) (bool, error)
	GetInt(ns, key string) (int, error)
	GetString(ns, key string) (string, error)
	GetStringSlice(ns, key string) ([]string, error)
	GetStringMap(ns, key string) (map[string]string, error)

	SetValue(ns, key string, value interface{}) error
}

Config encapsulates a config store.

func NewConfig

func NewConfig() Config

NewConfig creates a new config store.

type PortHole

type PortHole interface {
	Trace(string, ...interface{})
	Debug(string, ...interface{})
	Info(string, ...interface{})
	Warn(string, ...interface{})
	Error(string, ...interface{})
	Fatal(string, ...interface{})
	Panic(string, ...interface{})
	GetLogLevel() string

	Magenta(string) string
	Cyan(string) string
	Red(string) string
	Yellow(string) string
	Blue(string) string
	Green(string) string
	Gray(string) string
	Bold(string) string

	IsConsoleTTY() bool
	IsConsoleColored() bool
	ConsoleWrite(string, ...interface{}) error

	Config() Config
}

PortHole encapsulates an execution context.

func NewPortHole

func NewPortHole(consoleOut, errorOut io.Writer, config Config, logLevel string, enableColors bool) PortHole

NewPortHole creates a new PortHole.

Jump to

Keyboard shortcuts

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