diff options
| author | Shulhan <ms@kilabit.info> | 2024-09-03 00:16:13 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-09-04 01:09:51 +0700 |
| commit | 061cf9bf6072e0f718c6c16935caf218d05da5de (patch) | |
| tree | 056c2fac58af9908bcd0b0ee196875404a0df3ad /CHANGELOG.adoc | |
| parent | bea911e27eb064653e46493320d3a15061672acc (diff) | |
| download | pakakeh.go-0.57.0.tar.xz | |
Release pakakeh.go v0.57.0 (2024-09-03)v0.57.0
=== Breaking changes
* lib/sql: replace [http.FileSystem] with [memfs.MemFS]
Accepting the [http.FileSystem] means that the parameter can receive
an instance of [embed.FS], but in most cases, it will fail.
Case example, when we embed SQL files for migration under
"db/migration" using the "go:embed" directive,
//go:embed db/migration/*.sql
var DBMigrationFS embed.FS
and then call the [Migrate] function, it will not find any ".sql"
files inside the "/" directory because the files is stored under
"db/migration/" prefix (also there is no "/" when using embed.FS).
=== Chores
* lib/memfs: document the comparison with "go:embed" directive
Compare it to "go:embed", the memfs package is more flexible and
portable. Currently, we found three disadvantages of using "go:embed",
- The "go:embed" only works if files or directory to be embedded is
in the same parent directory.
- Accessing the embedded file require the original path.
- No development mode.
None of those limitation affected the memfs package.
Diffstat (limited to 'CHANGELOG.adoc')
| -rw-r--r-- | CHANGELOG.adoc | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 5dcc5de0..e42c5792 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -20,6 +20,48 @@ link:CHANGELOG_2018-2019.html[Changelog from 2018 to 2019^]. This is changelog for `pakakeh.go` module since v0.1.0 until v0.11.0. +[#v0_57_0] +== pakakeh.go v0.57.0 (2024-09-03) + +[#v0_57_0__breaking_changes] +=== Breaking changes + +lib/sql: replace [http.FileSystem] with [memfs.MemFS]:: ++ +-- +Accepting the [http.FileSystem] means that the parameter can receive an +instance of [embed.FS], but in most cases, it will fail. + +Case example, when we embed SQL files for migration under +"db/migration" using the "go:embed" directive, + + //go:embed db/migration/*.sql + var DBMigrationFS embed.FS + +and then call the [Migrate] function, it will not find any ".sql" +files inside the "/" directory because the files is stored under +"db/migration/" prefix (also there is no "/" when using embed.FS). +-- + +[#v0_57_0__chores] +=== Chores + +lib/memfs: document the comparison with "go:embed" directive:: ++ +-- +Compare it to "go:embed", the memfs package is more flexible and +portable. +Currently, we found three disadvantages of using "go:embed", + +- The "go:embed" only works if files or directory to be + embedded is in the same parent directory. +- Accessing the embedded file require the original path. +- No development mode. + +None of those limitation affected the memfs package. +-- + + [#v0_56_0] == pakakeh.go v0.56.0 (2024-08-04) |
