metadata

package
v0.0.0-...-3cc3ff2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 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 Meta

type Meta struct {
	// contains filtered or unexported fields
}

Meta represents a metadata store capable of holding values that extend a given struct through a context Value like approach.

func WithValue

func WithValue(parent *Meta, key, value interface{}) *Meta

WithValue returns a copy of parent in which the value associated with key is val.

func (*Meta) Value

func (c *Meta) Value(key interface{}) interface{}

Value compares the given key with the value key inside the given meta object. If the keys match is the value returned. If the keys do not match is the parent object called.

Jump to

Keyboard shortcuts

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