From 8659a5237988a523608569f2613e8c7f71714a2f Mon Sep 17 00:00:00 2001 From: Noah Watkins Date: Mon, 26 May 2014 11:14:12 -0700 Subject: [PATCH] doc: update readme with example Signed-off-by: Noah Watkins --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 7fe2efc..8c3a1b0 100644 --- a/README.md +++ b/README.md @@ -10,3 +10,19 @@ The native RADOS library and development headers are expected to be installed. Detailed documentation is available at . + +## Example + +Connect to a cluster and list the pools: + +```go +conn, _ := rados.NewConn() +conn.ReadDefaultConfigFile() +conn.Connect() +pools, _ := conn.ListPools() +fmt.Println(len(pools), pools) +``` + +will print: + + 3 [data metadata rbd]