From 68345fdc8f77aff4e37031c0a73ee38e5a0bf8a4 Mon Sep 17 00:00:00 2001 From: Fatih Arslan Date: Sun, 27 Jul 2014 17:01:33 +0300 Subject: [PATCH] Update README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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