ctx

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ctx

type Ctx struct {
	*Ctx
	// contains filtered or unexported fields
}

Ctx is a context that can store key-value pairs.

func (*Ctx) Clear

func (c *Ctx) Clear()

Clear removes all key-value pairs from the context.

func (*Ctx) Get

func (c *Ctx) Get(key string) (bool, any)

Get returns a value by its key.

func (*Ctx) Set

func (c *Ctx) Set(key string, val any)

Set sets a key-value pair in the context.

func (*Ctx) Unset

func (c *Ctx) Unset(key string)

Unset removes a key-value pair from the context.

Jump to

Keyboard shortcuts

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