parameters

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package parameters implements a simple in-memory key/value store, used internally by Mocha.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Params

type Params interface {
	// Get returns the parameter by its key.
	Get(key string) (any, bool)

	// GetAll returns all stored parameters.
	GetAll() map[string]any

	// Set sets a parameter.
	Set(key string, dep any)

	// Remove removes a parameter by its key.
	Remove(key string)

	// Has checks if a parameter with the given key exists.
	Has(key string) bool
}

Params defines the contract to an in-memory storage for generic parameters.

func New

func New() Params

New returns a Params concrete implementation.

Jump to

Keyboard shortcuts

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