<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pakakeh.go, branch v0.51.0</title>
<subtitle>Collections of packages and tools for working with Go programming language.</subtitle>
<id>http://git.kilabit.info/pakakeh.go/atom?h=v0.51.0</id>
<link rel='self' href='http://git.kilabit.info/pakakeh.go/atom?h=v0.51.0'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/'/>
<updated>2023-12-05T17:46:04Z</updated>
<entry>
<title>Release share v0.51.0 (2023-12-06)</title>
<updated>2023-12-05T17:46:04Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-12-05T17:46:04Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=5d94c37862657ed1e76e6525c8b6c73ec659bedb'/>
<id>urn:sha1:5d94c37862657ed1e76e6525c8b6c73ec659bedb</id>
<content type='text'>
=== New features

* lib/http: implement Server-Sent Events (SSE)
* lib/net: add method Read
* lib/crypto: add support for reading passphrase using SSH_ASKPASS
* lib/memfs: add method JSON to Node

=== Enhancements

* lib/ini: create the file if its not exist on Open
* lib/net: use [time.Ticker] to loop in WaitAlive
* lib/memfs: add sub file system
* lib/memfs: improve the refresh method
* lib/ini: append variable into section before any empty lines
* lib/memfs: stop all Watcher spawn by DirWatcher
* lib/memfs: remove embedding os.FileInfo and http.File
* lib/memfs: refactoring, simplify DirWatcher logic
* email/dkim: set ExpiredAt to MaxInt64 if value is greater than 12 digits
</content>
</entry>
<entry>
<title>go.mod: update all dependencies</title>
<updated>2023-12-05T17:04:05Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-12-05T17:04:05Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=3ca023bddb0de2f54d8959f8f94abe0c761bdd77'/>
<id>urn:sha1:3ca023bddb0de2f54d8959f8f94abe0c761bdd77</id>
<content type='text'>
</content>
</entry>
<entry>
<title>http/sseclient: add test for multi lines with empty line in middle</title>
<updated>2023-12-02T17:30:50Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-12-02T17:30:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=7ac80e78ee29643765e9d90d40914b36a7c21479'/>
<id>urn:sha1:7ac80e78ee29643765e9d90d40914b36a7c21479</id>
<content type='text'>
When running the EventSource client in Firefox, we found out that when
server send a multi line content with empty line in the middle, the empty
line is ignored by Firefox.

Just to make sure we test it here and the server send it as expected

  event:message\ndata:line 1\ndata:\ndata:line2\ndata:\ndata:\n\n

This case is similar with case number 3 when testing raw data.
So probably this is bug in our implementation of SSE in another project.
</content>
</entry>
<entry>
<title>lib/http: add field KeepAliveInterval in SSEEndpoint</title>
<updated>2023-11-27T12:04:56Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-11-27T12:04:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=635cdf86fcfdef46f708c32467a5bd578a96baf7'/>
<id>urn:sha1:635cdf86fcfdef46f708c32467a5bd578a96baf7</id>
<content type='text'>
The KeepAliveInterval define the interval where server will send a
an empty message ":\n\n" to active connection periodically.
This field is optional, default and minimum value is 5 seconds.
</content>
</entry>
<entry>
<title>http/sseclient: add method IDInt to Event</title>
<updated>2023-11-26T14:32:52Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-11-26T14:22:31Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=5b7f3a702aa8210e9f3efcc9befeceb87755fc4d'/>
<id>urn:sha1:5b7f3a702aa8210e9f3efcc9befeceb87755fc4d</id>
<content type='text'>
The IDInt return the ID as int64.
If the ID cannot be converted to integer it would return 0.
</content>
</entry>
<entry>
<title>lib/http: simplify SSEConn API, remove the WriteMessage</title>
<updated>2023-11-26T14:32:52Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-11-26T13:28:44Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=bc06fe56976bc7b863dba65347d24d50359f903b'/>
<id>urn:sha1:bc06fe56976bc7b863dba65347d24d50359f903b</id>
<content type='text'>
Using the WriteEvent alone, we can skip writing "event:" line if the
passed "event" parameter is empty, and write the rest of data and/or id.
</content>
</entry>
<entry>
<title>lib/http: update comment on Client.PostJSON and ClientOptions.ServerUrl</title>
<updated>2023-11-26T14:32:52Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-11-26T13:17:31Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=65a77e7fbdf4f9eb2dd84cf006f42b08b868151a'/>
<id>urn:sha1:65a77e7fbdf4f9eb2dd84cf006f42b08b868151a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>lib/net: use [time.Ticker] to loop in WaitAlive</title>
<updated>2023-11-26T14:32:52Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-11-26T13:14:15Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=1425ec0b23f24c7f59036b3b3a4afb34f7508e86'/>
<id>urn:sha1:1425ec0b23f24c7f59036b3b3a4afb34f7508e86</id>
<content type='text'>
The Timeout field in net.Dialer sometimes does not have any effect.
In the for-loop, we expect that each Dial at least consume 100 ms
before returning an error.

Turns out, on several occasion, the loop run too quickly, less than the
passed timeout.
This is probably because the listening address has not been
active yet and we run it in the same machine, the OS (or Go?) return
immediately without waiting for timeout.
</content>
</entry>
<entry>
<title>http/sseclient: implement Client retry</title>
<updated>2023-11-26T14:32:52Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-11-24T17:04:54Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=53cf77b77d36404cf720ec286bb7830b9dd6bc10'/>
<id>urn:sha1:53cf77b77d36404cf720ec286bb7830b9dd6bc10</id>
<content type='text'>
This changes everything.
On the server we split the SSEEndpoint to new type SSEConn, so each
callback use different instance of conn.

On the Client, we need to store the parsed serverUrl and the passed
header so it can be reused.
</content>
</entry>
<entry>
<title>http/sseclient: remove double check for non-empty packet</title>
<updated>2023-11-26T14:32:52Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-11-24T14:45:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=93c7f9f18eafb68ff892a2ecb3de25d8a56d3e84'/>
<id>urn:sha1:93c7f9f18eafb68ff892a2ecb3de25d8a56d3e84</id>
<content type='text'>
Let the parseEvent handle and check for empty packet.
</content>
</entry>
</feed>
