# Go第三方庫structs

see <https://github.com/fatih/structs>

#### 範例：拿到結構裡面的欄位名

```
type A struct {
    Foo string
    Bar int
}

func main() {
    names := structs.Names(&A{})
    fmt.Println(names) // ["Foo", "Bar"]
}
```

| ref                                                                                                                                 | Note       |
| ----------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| [Get name of struct field using reflection](https://stackoverflow.com/questions/24337145/get-name-of-struct-field-using-reflection) | reflection |
|                                                                                                                                     |            |
|                                                                                                                                     |            |
