comment tweaks

This commit is contained in:
Jeremy Jay 2014-07-18 14:54:29 -04:00
parent fb3e181a62
commit 923679b36c
3 changed files with 5 additions and 5 deletions

View file

@ -27,7 +27,7 @@ import (
"github.com/google/cayley/graph"
"github.com/google/cayley/http"
// load all supported backends
// Load all supported backends.
_ "github.com/google/cayley/graph/leveldb"
_ "github.com/google/cayley/graph/memstore"
_ "github.com/google/cayley/graph/mongo"

View file

@ -26,10 +26,9 @@ func Open(cfg *config.Config) graph.TripleStore {
ts, err := graph.NewTripleStore(cfg.DatabaseType, cfg.DatabasePath, cfg.DatabaseOptions)
if err != nil {
glog.Fatalln(err.Error())
return nil
}
// memstore is not persistent, so MUST be loaded
// Memstore is not persistent, so it MUST be loaded.
if cfg.DatabaseType == "memstore" {
Load(ts, cfg, cfg.DatabasePath)
}

View file

@ -163,9 +163,10 @@ func InitTripleStore(name, dbpath string, opts Options) error {
return errors.New("triplestore: name '" + name + "' is not registered")
}
func TripleStores() (t []string) {
func TripleStores() []string {
t := make([]string, 0, len(storeRegistry))
for n := range storeRegistry {
t = append(t, n)
}
return
return t
}