gitlab.com/Raven-IO/raven-delve@v1.22.4/_fixtures/issue384.go (about)

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  	"reflect"
     6  )
     7  
     8  func main() {
     9  	type S struct {
    10  		F string `species:"gopher" color:"blue"`
    11  	}
    12  
    13  	s := S{}
    14  	st := reflect.TypeOf(s)
    15  	field := st.Field(0)
    16  	fmt.Println(field.Tag.Get("color"), field.Tag.Get("species"))
    17  }