Update README.md
This commit is contained in:
parent
c8876826eb
commit
4f9899b12b
@ -1,5 +1,4 @@
|
|||||||
# Structure [](http://godoc.org/github.com/fatih/structure) [](https://travis-ci.org/fatih/structure)
|
# Structure [](http://godoc.org/github.com/fatih/structure) [](https://travis-ci.org/fatih/structure)
|
||||||
=========
|
|
||||||
|
|
||||||
Structure contains various utilitis to work with Go structs.
|
Structure contains various utilitis to work with Go structs.
|
||||||
|
|
||||||
@ -24,13 +23,12 @@ s := &Server{
|
|||||||
Enabled: true,
|
Enabled: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
m, err := ToMap(s)
|
m, err := structure.ToMap(s)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("%#v", m)
|
fmt.Printf("%#v", m)
|
||||||
// Output: map[string]interface {}{"Name":"Arslan", "ID":123456, "Enabled":true}
|
// Output: map[string]interface {}{"Name":"Arslan", "ID":123456, "Enabled":true}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user