|
|
@@ -1,6 +1,7 @@ |
|
|
|
package writeas |
|
|
|
|
|
|
|
import ( |
|
|
|
"fmt" |
|
|
|
"testing" |
|
|
|
) |
|
|
|
|
|
|
@@ -17,3 +18,13 @@ func TestGetCollection(t *testing.T) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
func ExampleGetCollection() { |
|
|
|
c := NewClient() |
|
|
|
coll, err := c.GetCollection("blog") |
|
|
|
if err != nil { |
|
|
|
fmt.Printf("%v", err) |
|
|
|
return |
|
|
|
} |
|
|
|
fmt.Printf("%+v", coll) |
|
|
|
} |