run

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package run provides methods to query the running mode of program.

Index

Constants

View Source
const (
	NormalModeFlag = 0x0000
	RecordModeFlag = 0x0001
	ReplayModeFlag = 0x0002
	TestModeFlag   = 0x0004
)

Variables

This section is empty.

Functions

func MustTestMode

func MustTestMode()

MustTestMode panic occurs when calling not in test mode.

func NormalMode

func NormalMode() bool

NormalMode returns whether it is running in normal mode.

func RecordMode

func RecordMode() bool

RecordMode returns whether it is running in record mode.

func ReplayMode

func ReplayMode() bool

ReplayMode returns whether it is running in replay mode.

func SetMode

func SetMode(flag int) (reset func())

SetMode sets the running mode, only in unit test mode.

func TestMode

func TestMode() bool

TestMode returns whether it is running in test mode.

Types

This section is empty.

Jump to

Keyboard shortcuts

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