Ship en_US, sv_SE, misc, geo/SE and geo/US as Go packages exporting FS, listed by data.Modules(), and fail a bare New naming WithDataFS
This commit is contained in:
@@ -24,6 +24,8 @@ type node interface{ isNode() }
|
||||
type folder struct {
|
||||
children map[string]node
|
||||
unloaded map[string]*indexed
|
||||
// reads is, for each category, the modules its source's manifest names it reading by default.
|
||||
reads map[string][]string
|
||||
}
|
||||
|
||||
func (*folder) isNode() {}
|
||||
@@ -33,6 +35,17 @@ func (g *folder) put(name string, n node) {
|
||||
delete(g.unloaded, name)
|
||||
}
|
||||
|
||||
func (g *folder) setReads(name string, reads []string) {
|
||||
if len(reads) == 0 {
|
||||
delete(g.reads, name)
|
||||
return
|
||||
}
|
||||
if g.reads == nil {
|
||||
g.reads = map[string][]string{}
|
||||
}
|
||||
g.reads[name] = reads
|
||||
}
|
||||
|
||||
func (g *folder) putUnloaded(name string, x *indexed) {
|
||||
delete(g.children, name)
|
||||
if g.unloaded == nil {
|
||||
|
||||
Reference in New Issue
Block a user