Commits

Anonymous committed 4a7594e

cosmetic

  • Participants
  • Parent commits b495c74

Comments (0)

Files changed (2)

 package cabinet
 import "bitbucket.org/ww/cabinet"
 
- Kyoto Cabinet bindings for Go.
-
- Copyleft by William Waites in 2011
+Kyoto Cabinet bindings for Go. Copyleft by William Waites in 2011
 
  This program is free software: you can redistribute it and/or modify it under the terms of
  the GNU General Public License as published by the Free Software Foundation, either version
  You should have received a copy of the GNU General Public License along with this program.
  If not, see <http://www.gnu.org/licenses/>.
 
- These bindings have been tested with Kyoto Cabinet version 1.2.46.
- They are known not to work with 1.2.7 because of the absent
- kcdbreplace() function call. Once Kyoto Cabinet is installed, building
- the bindings should be a simple matter of running:
+These bindings have been tested with Kyoto Cabinet version 1.2.46.
+They are known not to work with 1.2.7 because of the absent
+kcdbreplace() function call. Once Kyoto Cabinet is installed, building
+the bindings should be a simple matter of running:
 
-     goinstall -u -v bitbucket.org/ww/cabinet
+    goinstall -u -v bitbucket.org/ww/cabinet
 
- Simple usage will be along the lines of,
+Simple usage will be along the lines of,
 
-     import (
-         "bitbucket.org/ww/cabinet
-     )
+    import (
+        "bitbucket.org/ww/cabinet
+    )
 
-     ...
+    ...
 
-     kc := cabinet.New()
-     err = kc.Open("some_db.kch")
-     err = kc.Set([]byte("hello"), []byte("world"))
-     world, err = kc.Get([]byte("hello"))
-     err = kc.Close()
-     kc.Del()
+    kc := cabinet.New()
+    err = kc.Open("some_db.kch")
+    err = kc.Set([]byte("hello"), []byte("world"))
+    world, err = kc.Get([]byte("hello"))
+    err = kc.Close()
+    kc.Del()
 
- Obviously checking the relevant errors...
+Obviously checking the relevant errors...
 
- The API follows the Kyoto Cabinet C API closely, for some examples see
- http://fallabs.com/kyotocabinet/api/
+The API follows the Kyoto Cabinet C API closely, for some examples see
+http://fallabs.com/kyotocabinet/api/
 
- Most input and output variables are []byte and not string. This is because
- Kyoto Cabinet is not particularly concerned with strings and it is possible
- to use any byte array as either key or value. An example from the test
- suite to read an integer out of the database:
+Most input and output variables are []byte and not string. This is because
+Kyoto Cabinet is not particularly concerned with strings and it is possible
+to use any byte array as either key or value. An example from the test
+suite to read an integer out of the database:
 
-     v, err = kc.Get([]byte("numbers"))
-     binary.Read(bytes.NewBuffer(v), binary.BigEndian, &n)
+    v, err = kc.Get([]byte("numbers"))
+    binary.Read(bytes.NewBuffer(v), binary.BigEndian, &n)
 
- Some functions have been added for convenience using Go. The Keys()
- Values() and Items() on the cursor object return a channel over which
- their results will be sent, for example. This probably obviates the need
- for implementing the visitor-callback pattern when using Kyoto Cabinet
- with Go.
+Some functions have been added for convenience using Go. The Keys()
+Values() and Items() on the cursor object return a channel over which
+their results will be sent, for example. This probably obviates the need
+for implementing the visitor-callback pattern when using Kyoto Cabinet
+with Go.
 
- If you use this module please feel free to contact me, ww@styx.org
- with any questions, comments or bug reports.
+If you use this module please feel free to contact me, ww@styx.org
+with any questions, comments or bug reports.
 
 
 CONSTANTS
 
 func (kc *KCDB) Values() (out chan []byte)
 
-
-SUBDIRECTORIES
-
-	.hg
 /*
 
- Kyoto Cabinet bindings for Go.
-
- Copyleft by William Waites in 2011
+Kyoto Cabinet bindings for Go. Copyleft by William Waites in 2011
 
  This program is free software: you can redistribute it and/or modify it under the terms of
  the GNU General Public License as published by the Free Software Foundation, either version
  You should have received a copy of the GNU General Public License along with this program.
  If not, see <http://www.gnu.org/licenses/>.
 
- These bindings have been tested with Kyoto Cabinet version 1.2.46.
- They are known not to work with 1.2.7 because of the absent
- kcdbreplace() function call. Once Kyoto Cabinet is installed, building
- the bindings should be a simple matter of running:
+These bindings have been tested with Kyoto Cabinet version 1.2.46.
+They are known not to work with 1.2.7 because of the absent
+kcdbreplace() function call. Once Kyoto Cabinet is installed, building
+the bindings should be a simple matter of running:
 
-     goinstall -u -v bitbucket.org/ww/cabinet
+    goinstall -u -v bitbucket.org/ww/cabinet
 
- Simple usage will be along the lines of,
+Simple usage will be along the lines of,
 
-     import (
-         "bitbucket.org/ww/cabinet
-     )
+    import (
+        "bitbucket.org/ww/cabinet
+    )
 
-     ...
+    ...
 
-     kc := cabinet.New()
-     err = kc.Open("some_db.kch")
-     err = kc.Set([]byte("hello"), []byte("world"))
-     world, err = kc.Get([]byte("hello"))
-     err = kc.Close()
-     kc.Del()
+    kc := cabinet.New()
+    err = kc.Open("some_db.kch")
+    err = kc.Set([]byte("hello"), []byte("world"))
+    world, err = kc.Get([]byte("hello"))
+    err = kc.Close()
+    kc.Del()
 
- Obviously checking the relevant errors...
+Obviously checking the relevant errors...
 
- The API follows the Kyoto Cabinet C API closely, for some examples see
- http://fallabs.com/kyotocabinet/api/
+The API follows the Kyoto Cabinet C API closely, for some examples see
+http://fallabs.com/kyotocabinet/api/
 
- Most input and output variables are []byte and not string. This is because
- Kyoto Cabinet is not particularly concerned with strings and it is possible
- to use any byte array as either key or value. An example from the test 
- suite to read an integer out of the database:
+Most input and output variables are []byte and not string. This is because
+Kyoto Cabinet is not particularly concerned with strings and it is possible
+to use any byte array as either key or value. An example from the test 
+suite to read an integer out of the database:
 
-     v, err = kc.Get([]byte("numbers"))
-     binary.Read(bytes.NewBuffer(v), binary.BigEndian, &n)
+    v, err = kc.Get([]byte("numbers"))
+    binary.Read(bytes.NewBuffer(v), binary.BigEndian, &n)
 
- Some functions have been added for convenience using Go. The Keys()
- Values() and Items() on the cursor object return a channel over which
- their results will be sent, for example. This probably obviates the need
- for implementing the visitor-callback pattern when using Kyoto Cabinet
- with Go.
+Some functions have been added for convenience using Go. The Keys()
+Values() and Items() on the cursor object return a channel over which
+their results will be sent, for example. This probably obviates the need
+for implementing the visitor-callback pattern when using Kyoto Cabinet
+with Go.
 
- If you use this module please feel free to contact me, ww@styx.org
- with any questions, comments or bug reports.
+If you use this module please feel free to contact me, ww@styx.org
+with any questions, comments or bug reports.
+
 */
 package cabinet