trait

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 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 HasDetail

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

HasDetail is a trait that can be applied to a struct to indicate that it has a detail field.

func (*HasDetail) Detail

func (i *HasDetail) Detail(key, value string)

Detail sets the detail for the given key.

func (*HasDetail) GetDetail

func (i *HasDetail) GetDetail(key string) string

GetDetail returns the detail for the given key.

func (*HasDetail) GetDetails

func (i *HasDetail) GetDetails() map[string]string

GetDetails returns the details map.

func (*HasDetail) Has added in v1.5.0

func (i *HasDetail) Has(key string) bool

Has returns true if the given key is present in the details.

Jump to

Keyboard shortcuts

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