go-vise

Constrained Size Output Virtual Machine
Info | Log | Files | Refs | README | LICENSE

commit 95a348da2917dafd097564e93d2452930d7aec0d
parent 3b0cfe44aeb11c25a123ac43ee815fe01d29314c
Author: lash <dev@holbrook.no>
Date:   Sun,  1 Sep 2024 07:08:46 +0100

Conceal db.lookupKey

Diffstat:
Mdb/db.go | 6+++---
Mdb/fs.go | 4++--
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/db/db.go b/db/db.go @@ -47,7 +47,7 @@ type Db interface { SetSession(sessionId string) } -type LookupKey struct { +type lookupKey struct { Default []byte Translation []byte } @@ -107,8 +107,8 @@ func(db *baseDb) SetLanguage(ln *lang.Language) { } // ToKey creates a DbKey within the current session context. -func(db *baseDb) ToKey(ctx context.Context, key []byte) (LookupKey, error) { - var lk LookupKey +func(db *baseDb) ToKey(ctx context.Context, key []byte) (lookupKey, error) { + var lk lookupKey var b []byte if db.pfx == DATATYPE_UNKNOWN { return lk, errors.New("datatype prefix cannot be UNKNOWN") diff --git a/db/fs.go b/db/fs.go @@ -108,7 +108,7 @@ func(fdb *fsDb) Close() error { } // create a key safe for the filesystem. -func(fdb *fsDb) pathFor(ctx context.Context, lk *LookupKey) (fsLookupKey, error) { +func(fdb *fsDb) pathFor(ctx context.Context, lk *lookupKey) (fsLookupKey, error) { var flk fsLookupKey lk.Default[0] += 0x30 flk.Default = path.Join(fdb.dir, string(lk.Default)) @@ -120,7 +120,7 @@ func(fdb *fsDb) pathFor(ctx context.Context, lk *LookupKey) (fsLookupKey, error) } // create a key safe for the filesystem, matching legacy resource.FsResource name. -func(fdb *fsDb) altPathFor(ctx context.Context, lk *LookupKey) (fsLookupKey, error) { +func(fdb *fsDb) altPathFor(ctx context.Context, lk *lookupKey) (fsLookupKey, error) { var flk fsLookupKey fb := string(lk.Default[1:]) if fdb.pfx == DATATYPE_BIN {