diff options
| author | Shulhan <ms@kilabit.info> | 2023-06-04 01:53:28 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-06-04 04:58:14 +0700 |
| commit | 2d57327dbe2d2d2d819d699f543daac9a55e48e9 (patch) | |
| tree | 3fab99ad2162d76f7abd846185ab8e025c6ccba3 | |
| parent | 25d09e2625ffe7a3a254f5bdb3351f405bfb0246 (diff) | |
| download | pakakeh.go-0.47.0.tar.xz | |
Release share v0.47.0 (2023-06-04)v0.47.0
=== Breaking changes
* email/maildir: major refactoring plus adding unit tests
* lib/email: unexport the field ContentType in the field
=== Bug fixes
* lib/dns: fix zone parsing on SOA record with single line
* lib/memfs: ignore permission error when scanning directory content
* lib/memfs: fix panic when watched file deleted or renamed
* lib/email: fix parsing multiple parameters in ContentType
=== New features
* cmd/bcrypt: CLI to compare or generate hash using bcrypt
* lib/sql: add type DmlKind
* email/maildir: implement Folder
* lib/net: add function WaitAlive
* lib/smtp: implement Client SendEmail
=== Enhancements
* lib/dns: add option to set debug level in ServerOptions
* lib/dns: do not cache empty answers
* _bin/go-test-coverhtml: add parameter to run specific test
* lib/http: redirect path with slash if request is directory
* lib/email: handle obsolete white spaces and comment when unpacking date
* lib/email: set the Field Type and unpack its value on ParseField
* lib/net: increase the maximum poll events
* lib/websocket: increase the max buffer and queue for better throughput
=== Chores
* all: remove any usage of debug.Value in all packages
* lib/test: update documentation related to Assert and Data
* all: record the contributors of this module in file AUTHORS
Signed-off-by: Shulhan <ms@kilabit.info>
| -rw-r--r-- | CHANGELOG.adoc | 179 | ||||
| -rw-r--r-- | share.go | 2 |
2 files changed, 180 insertions, 1 deletions
diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 930a4f58..dee2ea83 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -19,6 +19,185 @@ 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_47_0] +== share v0.47.0 (2023-06-05) + +[#v0_47_0__breaking_changes] +=== Breaking changes + +email/maildir: major refactoring plus adding unit tests:: ++ +This changes remove all unneeded methods from Manager leave it with +four methods: Delete, FetchNew, Incoming, OutgoingQueue. ++ +Also, we add the type filename to generate file name for tmp and new +directory. + +lib/email: unexport the field ContentType in the field:: ++ +The field ContentType will be set only when the field Name is +"Content-Type" so it's not always exist on each field. +To get the field ContentType, use Header.ContentType(). + + +[#v0_47_0__bug_fixes] +=== Bug fixes + +lib/dns: fix zone parsing on SOA record with single line:: ++ +Due to refactoring in c376eccd25, parsing SOA record with single line +return an error: "parseSOA: line 2: incomplete SOA statement '0'". + +lib/memfs: ignore permission error when scanning directory content:: ++ +Instead of returning error, skip the directory that we cannot read and +continue to process the other. + +lib/memfs: fix panic when watched file deleted or renamed:: ++ +When the file being watched is deleted, sometimes it will cause panic. + +lib/email: fix parsing multiple parameters in ContentType:: ++ +While at it, also fix the ContentType String method to prefix ';' before +appending parameter key and value. + + +[#v0_47_0__new_features] +=== New features + +cmd/bcrypt: CLI to compare or generate hash using bcrypt:: ++ +The bcrypt command has two subcommand "compare" and "gen". +The "compare" subcommand accept two parameter the hash and plain text. +The "gen" subcommand accept only one parameter, the plain text to be hashed. + +lib/sql: add type DmlKind:: ++ +The DmlKind define the kind for Data Manipulation Language. + +email/maildir: implement Folder:: ++ +Folder is a directory under maildir that store messages per file. +A folder contains three directories: tmp, new, and cur; and an empty +file "maildirfolder". + +lib/net: add function WaitAlive:: ++ +-- +WaitAlive try to connect to network at address until timeout reached. +If connection cannot established it will return an error. + +Unlike [net.DialTimeout], this function will retry not returning an error +immediately if the address has not ready yet. +-- + +lib/smtp: implement Client SendEmail:: ++ +-- +Somehow in 3a1a2715b25f, we include this method without implementing it. + +The SendEmail method simplify sending email by automatically create +[MailTx] for passing it to method Client.MailTx. + +The test right now use live connection since the Server is not ready yet. +-- + +[#v0_47_0__enhancements] +=== Enhancements + +lib/dns: add option to set debug level in ServerOptions:: ++ +This options replace the global debug package. + +lib/dns: do not cache empty answers:: ++ +The use case if one use and switch between two different +networks with internal zone, frequently. +For example, if on network Y they have domain MY.Y and +current connection is X, request to MY.Y will return an +empty answers. +Once they connect to Y again, any request to MY.Y will not +be possible because rescached caches contains empty answer +for MY.Y. + +_bin/go-test-coverhtml: add parameter to run specific test:: ++ +The second parameter is optional. +It is passed to -run= argument in "go test". +Default value is ".", or all functions. + +lib/http: redirect path with slash if request is directory:: ++ +-- +If request path is a directory and it is not end with slash, redirect +request to location with slash to allow relative links works inside the +HTML content. + +For example, a "/page/index.html" contains links href="sub.html" (where +"sub.html" is inside "/page" directory). +If request to "/page" (without end with slash) return content of +"/page/index.html", then when user click on sub.html it will request to +"/sub.html" instead of "/page/sub.html". +-- + +lib/email: handle obsolete white spaces and comment when unpacking date:: ++ +-- +In the obsolete syntax, white space and comments can appear between many +more element, for example the folloing Date value are valid + + Date : Fri, 21 Nov 1997 09(comment): 55 : 06 -0600 + +This changes handle this by sanitizing the Field value, removing comment +and merge multiple spaces into one, before parsing it. +-- + +lib/email: set the Field Type and unpack its value on ParseField:: ++ +-- +Once the field Name has detected and its Value is valid, we can unpack +the Value based to type that it represent, for example to Date or Mailbox. + +This changes remove calling to unpack directly in some tests and check +an error when testing ParseHeader. +-- + +lib/net: increase the maximum poll events:: ++ +The maxQueue define the number of events that can be read from poll at +one time. +Using 128 seems to small for high throughput networks. +Increasing this number also increase the memory consumed by process. +Maybe later we can export this function as option when creating poll. + +lib/websocket: increase the max buffer and queue for better throughput:: ++ +-- +The maxBuffer increased from 1024 to 4096 bytes. +The reason that we use 1024 previously is related to MTU size and maximum +payload in TCP (although its higher, 1460 bytes). + +The maxQueue increase from 128 to 4096. +-- + +[#v0_47_0__chores] +=== Chores + +all: remove any usage of debug.Value in all packages:: ++ +Using global debug value for all packages turns out is not a good +idea. + +lib/test: update documentation related to Assert and Data:: ++ +The documentation is based on the article published at +https://kilabit.local/journal/2023/go_test_data/ +after reviewing and explain how to use both of them to public. + +all: record the contributors of this module in file AUTHORS:: + + [#v0_46_0] == share v0.46.0 (2023-05-02) @@ -8,5 +8,5 @@ package share var ( // Version of this module. - Version = `0.46.1-dev` + Version = `0.47.0` ) |
