diff options
| author | Shulhan <ms@kilabit.info> | 2023-11-06 20:51:46 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-11-07 20:18:38 +0700 |
| commit | 3bece2842069f98d048d2cdfec0b2f8250d38412 (patch) | |
| tree | 8fd849965f8ca073a2f2d90e091da0446a371dbe /cmd/ciigo-example | |
| parent | 46bd8b68dc8c2662618af11e3cf6a69b3194d29d (diff) | |
| download | ciigo-3bece2842069f98d048d2cdfec0b2f8250d38412.tar.xz | |
go.mod: update share module to v0.50.1
This release bring many enhancements to "lib/memfs", a library for
caching file system in memory.
=== Enhancements
* lib/memfs: return nil in AddChild if file not exist
* lib/memfs: quote the path in the returned error
* lib/memfs: add method Child to Node
* lib/memfs: call the Init method in the embedded file
* lib/memfs: include empty directory
* lib/memfs: re-scan directory content on Node’s Update
Diffstat (limited to 'cmd/ciigo-example')
| -rw-r--r-- | cmd/ciigo-example/static.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/ciigo-example/static.go b/cmd/ciigo-example/static.go index f2561db..90695e0 100644 --- a/cmd/ciigo-example/static.go +++ b/cmd/ciigo-example/static.go @@ -194,7 +194,7 @@ func init() { ciigoFS = &memfs.MemFS{ PathNodes: memfs.NewPathNode(), Opts: &memfs.Options{ - Root: "_example", + Root: "_example", MaxFileSize: 5242880, Includes: []string{ }, @@ -204,7 +204,7 @@ func init() { `^\..*`, }, Embed: memfs.EmbedOptions{ - CommentHeader: `// SPDX-FileCopyrightText: 2019 Shulhan <ms@kilabit.info> + CommentHeader: `// SPDX-FileCopyrightText: 2019 Shulhan <ms@kilabit.info> // SPDX-License-Identifier: GPL-3.0-or-later `, PackageName: "main", @@ -238,4 +238,9 @@ func init() { _ciigoFS_getNode(ciigoFS, "_internal/.template", generate__internal__template)) ciigoFS.Root = ciigoFS.PathNodes.Get("/") + + var err = ciigoFS.Init() + if err != nil { + panic("ciigoFS: " + err.Error()) + } } |
