global

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DebugMode indicates xun mode is debug.
	DebugMode = "debug"
	// ReleaseMode indicates xun mode is release.
	ReleaseMode = "release"
	// TestMode indicates xun mode is test.
	TestMode = "test"
)
View Source
const EnvXunMode = "XUN_MODE"

EnvXunMode indicates environment name for xun mode.

Variables

View Source
var DefaultErrorWriter io.Writer = os.Stderr

DefaultErrorWriter is the default io.Writer used by Xun to debug errors

View Source
var DefaultWriter io.Writer = os.Stdout

DefaultWriter is the default io.Writer used by Xun for debug output and middleware output like Logger() or Recovery(). Note that both Logger and Recovery provides custom ways to configure their output io.Writer. To support coloring in Windows use:

import "github.com/mattn/go-colorable"
xun.DefaultWriter = colorable.NewColorableStdout()

Functions

func Mode

func Mode() string

Mode returns currently xun mode.

func SetMode

func SetMode(value string)

SetMode sets gin mode according to input string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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