Source File
tag.go
Belonging Package
github.com/pancsta/go-app/pkg/app
package app// Tagger is the interface that describes a collection of tags that gives// context to something.type Tagger interface {// Returns a collection of tags.Tags() Tags}// Tags represent key-value pairs that give context to what they are used with.type Tags map[string]stringfunc ( Tags) () Tags {return}// Set sets a tag with the given name and value. The value is converted to a// string.func ( Tags) ( string, any) {[] = toString()}// Get returns a tag value with the given name.func ( Tags) ( string) string {return []}// Tag is a key-value pair that adds context to an action.type Tag struct {Name stringValue string}func ( Tag) () Tags {return Tags{.Name: .Value}}// T creates a tag with the given name and value. The value is converted to a// string.func ( string, any) Tag {return Tag{Name: ,Value: toString(),}}
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |