mode

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Copyright 2014 Manu Martinez-Almeida. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file. 运行模式

Index

Constants

View Source
const (
	// DebugMode indicates kn mode is debug.
	DebugMode = "debug"
	// ReleaseMode indicates kn mode is release.
	ReleaseMode = "release"
	// TestMode indicates kn mode is test.
	TestMode = "test"
)
View Source
const EnvKNMode = "KN_MODE"

EnvGinMode indicates environment name for kn mode.

Variables

View Source
var DefaultErrorWriter io.Writer = os.Stderr

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

View Source
var DefaultWriter io.Writer = os.Stdout

DefaultWriter is the default io.Writer used by Gin 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"
kn.DefaultWriter = colorable.NewColorableStdout()

Functions

func IsDebug

func IsDebug() bool

func IsRelease

func IsRelease() bool

func IsTest

func IsTest() bool

func Mode

func Mode() string

Mode returns currently mode.

func SetMode

func SetMode(value string)

SetMode sets 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