Files
LearnGO/go/pkg/mod/github.com/go-delve/delve@v1.23.0/_fixtures/issue384.go
T
2024-09-19 21:38:24 -04:00

18 lines
244 B
Go

package main
import (
"fmt"
"reflect"
)
func main() {
type S struct {
F string `species:"gopher" color:"blue"`
}
s := S{}
st := reflect.TypeOf(s)
field := st.Field(0)
fmt.Println(field.Tag.Get("color"), field.Tag.Get("species"))
}