mirror of https://github.com/ceph/go-ceph
doc: fix formatting in README
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
This commit is contained in:
parent
5d79dd9718
commit
f2ebce042d
22
README.md
22
README.md
|
@ -50,20 +50,20 @@ Object in RADOS can be written to and read from with through an interface very
|
||||||
similar to a standard file I/O interface:
|
similar to a standard file I/O interface:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
// open a pool handle
|
// open a pool handle
|
||||||
pool, err := conn.OpenPool("mypool")
|
pool, err := conn.OpenPool("mypool")
|
||||||
|
|
||||||
// write some data
|
// write some data
|
||||||
bytes_in := []byte("input data")
|
bytes_in := []byte("input data")
|
||||||
err = pool.Write("obj", bytes_in, 0)
|
err = pool.Write("obj", bytes_in, 0)
|
||||||
|
|
||||||
// read the data back out
|
// read the data back out
|
||||||
bytes_out := make([]byte, len(bytes_in))
|
bytes_out := make([]byte, len(bytes_in))
|
||||||
n_out, err := pool.Read("obj", bytes_out, 0)
|
n_out, err := pool.Read("obj", bytes_out, 0)
|
||||||
|
|
||||||
if bytes_in != bytes_out {
|
if bytes_in != bytes_out {
|
||||||
fmt.Println("Output is not input!")
|
fmt.Println("Output is not input!")
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Pool maintenance
|
### Pool maintenance
|
||||||
|
|
Loading…
Reference in New Issue