summaryrefslogtreecommitdiff
tag namev0.57.0 (286edb63bff76cdd1388e66acda3c0eff52878da)
tag date2024-09-04 01:29:25 +0700
tagged byShulhan <ms@kilabit.info>
tagged objectcommit 061cf9bf60...
downloadpakakeh.go-0.57.0.tar.xz
Release pakakeh.go v0.57.0 (2024-09-03)
=== 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. -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSyS35x1RIQ2SkuGz5KU2C1AMnE8AUCZtdViQAKCRBKU2C1AMnE 8CDTAQDDQ+jS0bK+59SvaVaB9wmvW+GBJjVf0JpBstsO1qWNZgD+MKA9v7W7MSFD 5xCId5S9CGX/vZbsBiyaIJLtw1CjgAw= =thxF -----END PGP SIGNATURE-----