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:
2026-10-10 13:08:01 +02:00
committed by Lillem4n
parent 3368f085fd
commit b8eba1eb35
151 changed files with 377 additions and 232 deletions
+6 -3
View File
@@ -13,6 +13,7 @@ import (
"errors"
"fmt"
"io"
"io/fs"
"os"
"runtime/debug"
"sort"
@@ -20,6 +21,7 @@ import (
"strings"
"github.com/larvit/fejkdata"
"github.com/larvit/fejkdata/data"
)
const usage = `Usage: <template> | fejkdata [flags]
@@ -319,10 +321,11 @@ func (in invocation) check() error {
}
func (in invocation) options() []fejkdata.Option {
var opts []fejkdata.Option
if in.noShipped {
opts = append(opts, fejkdata.WithoutShippedData())
var modules []fs.FS
if !in.noShipped {
modules = data.Modules()
}
opts := []fejkdata.Option{fejkdata.WithDataFS(modules...)}
for _, dir := range in.dirs {
opts = append(opts, fejkdata.WithDataPath(dir))
}