store: minor fixes
[epoint] / pkg / store / store.go
index e476a7e..21603fe 100644 (file)
@@ -18,19 +18,19 @@ type Conn struct {
 }
 
 type NotFoundError struct {
-       path string
+       Path string
 }
 
 type AlreadyExistsError struct {
-       path string
+       Path string
 }
 
 func (e NotFoundError) Error() string {
-       return "not found: " + e.path
+       return "not found: " + e.Path
 }
 
 func (e AlreadyExistsError) Error() string {
-       return "already exists: " + e.path
+       return "already exists: " + e.Path
 }
 
 // Open db connection
@@ -91,9 +91,6 @@ func (c *Conn) Insert(name, k string, v []byte) (err error) {
        }
        defer f.Close()
        _, err = f.Write(v)
-       if err != nil {
-               return
-       }
        return
 }