Link each template in steps that each return what they build, create a name scope with its owner in one place, and settle each record's columns at load, so Generator.records goes
This commit is contained in:
+1
-2
@@ -28,12 +28,11 @@ var ErrNoData = errors.New("no data: WithoutShippedData needs at least one WithD
|
||||
// It is safe for concurrent use; a seeded sequence is reproducible only when drawn
|
||||
// from one goroutine.
|
||||
type Generator struct {
|
||||
// mu guards drawState, records, structs and root, which gains a shipped category on the
|
||||
// mu guards drawState, structs and root, which gains a shipped category on the
|
||||
// first call reaching it.
|
||||
mu sync.Mutex
|
||||
drawState *drawstate.State
|
||||
root folder // the categories as the node a path walks from, owned here so a walk allocates none
|
||||
records map[node]recordShape
|
||||
structs map[reflect.Type]structResult
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user