庫第三方庫
Last updated 2 years ago
see https://github.com/fatih/structs
type A struct { Foo string Bar int } func main() { names := structs.Names(&A{}) fmt.Println(names) // ["Foo", "Bar"] }
Get name of struct field using reflection
reflection