Optionalize the sync parameter

This commit is contained in:
Barak Michener 2014-08-23 17:19:14 -04:00
parent 6d82c78b45
commit e11dfeb50f
2 changed files with 23 additions and 5 deletions

View file

@ -121,6 +121,18 @@ func (d Options) StringKey(key string) (string, bool) {
return "", false
}
func (d Options) BoolKey(key string) (bool, bool) {
if val, ok := d[key]; ok {
switch vv := val.(type) {
case bool:
return vv, true
default:
glog.Fatalln("Invalid", key, "parameter type from config.")
}
}
return false, false
}
var ErrCannotBulkLoad = errors.New("triplestore: cannot bulk load")
type BulkLoader interface {