Commit 4e115473 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 85a829ac
......@@ -165,7 +165,7 @@ func (obj *Persistent) PActivate(ctx context.Context) (err error) {
if l, s := obj.loading, obj.state; !(l == loading && s == GHOST) {
obj.mu.Unlock()
panic(obj.badf("activate: after load: object state unexpected: " +
panic(obj.badf("activate: after load: object state unexpected: "+
"%v (want %v); .loading = %p (want %p)", s, GHOST, l, loading))
}
......@@ -251,7 +251,6 @@ func (obj *Persistent) PInvalidate() {
obj.loading = nil
}
// istate returns .instance casted to corresponding stateType.
//
// returns: Ghostable + (Stateful | PyStateful).
......@@ -262,7 +261,7 @@ func (obj *Persistent) istate() Ghostable {
// badf returns formatted error prefixed with obj's class and oid.
func (obj *Persistent) badf(format string, argv ...interface{}) error {
return fmt.Errorf("%s(%s): " + format,
return fmt.Errorf("%s(%s): "+format,
append([]interface{}{obj.zclass.class, obj.oid}, argv...))
}
......@@ -296,7 +295,6 @@ var rGhostable = reflect.TypeOf((*Ghostable)(nil)).Elem() // typeof(Ghostabl
var rStateful = reflect.TypeOf((*Stateful)(nil)).Elem() // typeof(Stateful)
var rPyStateful = reflect.TypeOf((*PyStateful)(nil)).Elem() // typeof(PyStateful)
// RegisterClass registers ZODB class to correspond to Go type.
//
// Only registered classes can be saved to database, and are converted to
......@@ -370,7 +368,7 @@ func NewPersistent(typ reflect.Type, jar *Connection) IPersistent {
}
xpobj := reflect.New(zc.typ)
return persistentInit(xpobj, zc, jar, InvalidOid, InvalidTid, UPTODATE/*XXX ok?*/)
return persistentInit(xpobj, zc, jar, InvalidOid, InvalidTid, UPTODATE /*XXX ok?*/)
}
// newGhost creates new ghost object corresponding to class, oid and jar.
......
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