diff --git a/README.md b/README.md index ca46b9d..2a954fb 100644 --- a/README.md +++ b/README.md @@ -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