From 3bece2842069f98d048d2cdfec0b2f8250d38412 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Mon, 6 Nov 2023 20:51:46 +0700 Subject: go.mod: update share module to v0.50.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- cmd/ciigo-example/static.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'cmd/ciigo-example/static.go') 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 + CommentHeader: `// SPDX-FileCopyrightText: 2019 Shulhan // 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()) + } } -- cgit v1.3