state

package
v1.6.7 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package state allows you to switch running state from true/false to false/true.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStateEnabled  = errors.New("state already enabled")
	ErrStateDisabled = errors.New("state already disabled")
	ErrFuncEnable    = errors.New("enable state function")
	ErrFuncDisable   = errors.New("disable state function")
)

Functions

This section is empty.

Types

type IState

type IState interface {
	Enable(IStateF) error
	Disable(IStateF) error
}

func NewBoolState

func NewBoolState() IState

type IStateF added in v1.5.25

type IStateF func() error

Jump to

Keyboard shortcuts

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