Update README.md
This commit is contained in:
parent
9d01c85dab
commit
68345fdc8f
@ -26,7 +26,9 @@ s := &Server{
|
||||
}
|
||||
```
|
||||
|
||||
Convert it to a `map[string]interface{}`
|
||||
#### ToMap()
|
||||
|
||||
Convert to a `map[string]interface{}`
|
||||
|
||||
```go
|
||||
m, err := structure.ToMap(s)
|
||||
@ -38,6 +40,8 @@ if err != nil {
|
||||
fmt.Printf("%#v", m)
|
||||
```
|
||||
|
||||
#### ToSlice()
|
||||
|
||||
Convert to a `[]interface{}`. Slice values are **sorted** by default according
|
||||
to the field names.
|
||||
|
||||
@ -51,6 +55,8 @@ if err != nil {
|
||||
fmt.Printf("%#v", m)
|
||||
```
|
||||
|
||||
#### IsStruct()
|
||||
|
||||
Check if it's a struct or a pointer to struct
|
||||
|
||||
```go
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user