diff options
| author | Shulhan <ms@kilabit.info> | 2023-11-05 12:22:09 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-11-05 12:22:09 +0700 |
| commit | 4160c3778238a5b4dd3e3366be24dec80d62d409 (patch) | |
| tree | 19023b9110dd31e67391e8b108f557779d9cd916 | |
| parent | cdf63b664754fd2c53ec89d0e63410008e37516b (diff) | |
| download | pakakeh.go-0.50.1.tar.xz | |
Release share v0.50.1 (2023-11-05)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
| -rw-r--r-- | CHANGELOG.adoc | 64 | ||||
| -rw-r--r-- | share.go | 2 |
2 files changed, 65 insertions, 1 deletions
diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index b9f4e6f0..77856b30 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -19,6 +19,70 @@ link:CHANGELOG_2018-2019.html[Changelog from 2018 to 2019^]. This is changelog for share module since v0.1.0 until v0.11.0. +[#v0_50_1] +== share v0.50.1 (2023-11-05) + +This release bring many enhancements to "lib/memfs", a library for caching +file system in memory. + +[#v0_50_1__enhancements] +=== Enhancements + +lib/memfs: return nil in AddChild if file not exist:: ++ +-- +In case the node being added is a symlink, and the symlink is broken, +the AddChild will return an error "fs.ErrNotExist". + +In this changes we check for fs.ErrNotExist and return nil without an +error, so the user of AddChild can skip adding the node to the parent. +-- + +lib/memfs: quote the path in the returned error:: ++ +-- +Error message should at least contains 4W in the following order, + + WHEN WHO/WHERE WHAT WHY + +By quoting, user or machine can parse that the value inside quote +is the value that cause the error (the what), not part of the cause of +the error (the why). +-- + +lib/memfs: add method Child to Node:: ++ +The Child method return the child node based on its node. + +lib/memfs: call the Init method in the embedded file:: ++ +-- +By calling the Init method, the regular expression for include and +excludes are initialized, which allow using any method of MemFS instance +later, for example the Watch method. + +While at it, fix the fields alignment in template code format. +-- + +lib/memfs: include empty directory:: ++ +-- +Even thought empty directory does not contains file, from the parent +node _it is_ part of their content. + +Also, there is a use case where memfs use as virtual file system (VFS), +as a layer with file system, where user can view list of directory, +create a directory or file on the fly. +If we skip scanning empty directory, that directory will not be visible. +-- + +lib/memfs: re-scan directory content on Node's Update:: ++ +Previously, only node content get updated. +In case in the MemFS, user set "Options.TryDirect" to true, the directory +content should be updated too on "MemFS.Get". + + [#v0_50_0] == share v0.50.0 (2023-10-04) @@ -8,5 +8,5 @@ package share var ( // Version of this module. - Version = `0.50.0` + Version = `0.50.1` ) |
