Commit 9b38e483 authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

Merge pull request #2 from whyrusleeping/master

log datastore needed newlines
parents e89f0511 ce4a22fe
package datastore package datastore
import ( import "log"
"log"
)
// Here are some basic datastore implementations. // Here are some basic datastore implementations.
...@@ -92,27 +90,27 @@ func NewLogDatastore(ds Datastore, name string) *LogDatastore { ...@@ -92,27 +90,27 @@ func NewLogDatastore(ds Datastore, name string) *LogDatastore {
} }
func (d *LogDatastore) Put(key Key, value interface{}) (err error) { func (d *LogDatastore) Put(key Key, value interface{}) (err error) {
log.Printf("%s: Put %s", d.Name, key) log.Printf("%s: Put %s\n", d.Name, key)
// log.Printf("%s: Put %s ```%s```", d.Name, key, value) // log.Printf("%s: Put %s ```%s```", d.Name, key, value)
return d.Child.Put(key, value) return d.Child.Put(key, value)
} }
func (d *LogDatastore) Get(key Key) (value interface{}, err error) { func (d *LogDatastore) Get(key Key) (value interface{}, err error) {
log.Printf("%s: Get %s", d.Name, key) log.Printf("%s: Get %s\n", d.Name, key)
return d.Child.Get(key) return d.Child.Get(key)
} }
func (d *LogDatastore) Has(key Key) (exists bool, err error) { func (d *LogDatastore) Has(key Key) (exists bool, err error) {
log.Printf("%s: Has %s", d.Name, key) log.Printf("%s: Has %s\n", d.Name, key)
return d.Child.Has(key) return d.Child.Has(key)
} }
func (d *LogDatastore) Delete(key Key) (err error) { func (d *LogDatastore) Delete(key Key) (err error) {
log.Printf("%s: Delete %s", d.Name, key) log.Printf("%s: Delete %s\n", d.Name, key)
return d.Child.Delete(key) return d.Child.Delete(key)
} }
func (d *LogDatastore) KeyList() ([]Key, error) { func (d *LogDatastore) KeyList() ([]Key, error) {
log.Printf("%s: Get KeyList.", d.Name) log.Printf("%s: Get KeyList\n", d.Name)
return d.Child.KeyList() return d.Child.KeyList()
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment