params

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package params 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 P

type P 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
}

P defines a contract for a generic parameters repository.

func New

func New() P

New returns a P concrete implementation.

Jump to

Keyboard shortcuts

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