Guides
Combined Options
Combine values, flags, maps, slices, and nested data
Combined Options
You can combine primary values, flags, key/value options, slices, maps, and nested values in one tag.
service:"'my-service',optional,replicas=3,labels={'env':'prod','tier':'backend'},ports=[80,443]"type ServiceTag struct {
Name string `option:"value"`
Optional bool `option:"optional"`
Replicas int `option:"replicas"`
Labels map[string]string `option:"labels"`
Ports []int `option:"ports"`
}
func (t ServiceTag) Tag() string {
return "service"
}