Optionalize the sync parameter
This commit is contained in:
parent
6d82c78b45
commit
e11dfeb50f
2 changed files with 23 additions and 5 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue