<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pakakeh.go, branch v0.55.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.55.0</id>
<link rel='self' href='http://git.kilabit.info/pakakeh.go/atom?h=v0.55.0'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/'/>
<updated>2024-05-04T08:17:06Z</updated>
<entry>
<title>Release pakakeh.go v0.55.0 (2024-05-04)</title>
<updated>2024-05-04T08:17:06Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2024-05-04T08:05:07Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=85dffe4cb596ba8d5131c07f8993c6158184d988'/>
<id>urn:sha1:85dffe4cb596ba8d5131c07f8993c6158184d988</id>
<content type='text'>
=== Breaking changes

* lib/http: refactoring "multipart/form-data" parameters in ClientRequest

  Previously, ClientRequest with type RequestTypeMultipartForm pass the
  type "map[string][]byte" in Params.
  This type hold the file upload, where key is the file name and []byte
  is content of file.
  Unfortunately, this model does not correct because a
  "multipart/form-data" can contains different field name and file name,
  for example

    --boundary
    Content-Disposition: form-data; name="field0"; filename="file0"
    Content-Type: application/octet-stream

    &lt;Content of file0&gt;

  This changes fix this by changing the parameter type for
  RequestTypeMultipartForm to [*multipart.Form], which affect several
  functions including [Client.PutFormData] and [GenerateFormData].

===  Bug fixes

* lib/dns: fix packing and unpacking OPT record

  The RDATA in OPT records can contains zero or more options.
  Previously, we only handle unpacking and packing one option, now we
  handle multiple options.

* telegram/bot: fix Webhook URL registration

  Using [path.Join] cause "https://domain" become "https:/domain"
  which is not a valid URL. This bug caused by refactoring in b89afa24f.

=== Enhancements

* lib/memfs: set embed file mode to print as octal

  Using octal in mode make the embedded code more readable, for
  example mode with permission "0o644" much more readable than 420".

* telegram/bot: register GET endpoint to test webhook

  The call to get "GET &lt;Webhook.URL.Path&gt;/&lt;Token&gt;" will return HTTP
  status 200 with JSON body '{"code":200,"message":"OK"}'.

  This endpoint is to check if the bot server is really running.

* lib/http: allow all HTTP method to generate HTTP request with body

  Although the RFC 7231 says that no special defined meaning for a
  payload in GET, some implementation of HTTP API sometimes use GET with
  content type "application/x-www-form-urlencoded".

* lib/http: add new function [CreateMultipartFileHeader]

  The CreateMultipartFileHeader help creating [multipart.FileHeader]
  from raw bytes, that can be assigned to [*multipart.Form].
</content>
</entry>
<entry>
<title>lib: comply with linter recommendations</title>
<updated>2024-05-04T08:17:04Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2024-05-04T08:03:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=a129da5d8790b25de11fa270b411ad5aca6fa892'/>
<id>urn:sha1:a129da5d8790b25de11fa270b411ad5aca6fa892</id>
<content type='text'>
</content>
</entry>
<entry>
<title>go.mod: update module go-x-crypto</title>
<updated>2024-05-04T08:17:00Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2024-05-04T07:37:22Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=de4da5d99646d9daf494915901211348f9a3e1db'/>
<id>urn:sha1:de4da5d99646d9daf494915901211348f9a3e1db</id>
<content type='text'>
</content>
</entry>
<entry>
<title>lib/http: refactoring "multipart/form-data" parameters in ClientRequest</title>
<updated>2024-04-24T07:57:02Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2024-04-23T12:15:54Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=072a5866613aab933d03bef7df5a2dcb3a0855e4'/>
<id>urn:sha1:072a5866613aab933d03bef7df5a2dcb3a0855e4</id>
<content type='text'>
Previously, ClientRequest with type RequestTypeMultipartForm pass the
type "map[string][]byte" in Params.
This type hold the file upload, where key is the file name and []byte is
content of file.
Unfortunately, this model does not correct because a
"multipart/form-data" can contains different field name and file name,
for example

  --boundary
  Content-Disposition: form-data; name="field0"; filename="file0"
  Content-Type: application/octet-stream

  &lt;Content of file0&gt;

This changes fix this by changing the parameter type for
RequestTypeMultipartForm to [*multipart.Form], which affect several
functions including [Client.PutFormData] and [GenerateFormData].

We also add new function [CreateMultipartFileHeader] to help creating
[multipart.FileHeader] from raw bytes, that can be assigned to
[*multipart.Form].
</content>
</entry>
<entry>
<title>lib/http: allow all HTTP method to generate HTTP request with body</title>
<updated>2024-04-23T06:28:52Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2024-04-23T06:28:52Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=225b6372d0592c2291ff4b9301a68c80d4660d77'/>
<id>urn:sha1:225b6372d0592c2291ff4b9301a68c80d4660d77</id>
<content type='text'>
Althought the RFC 7231 says that no special defined meaning for a payload
in GET, some implementation of HTTP API sometimes use GET with content
type "application/x-www-form-urlencoded".
</content>
</entry>
<entry>
<title>telegram/bot: register GET endpoint to test webhook</title>
<updated>2024-04-16T17:54:29Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2024-04-16T17:54:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=f319122b736346c6e99d3d2165d018fb61de7faa'/>
<id>urn:sha1:f319122b736346c6e99d3d2165d018fb61de7faa</id>
<content type='text'>
The call to get "GET &lt;Webhook.URL.Path&gt;/&lt;Token&gt;" will return HTTP status
200 with JSON body '{"code":200,"message":"OK"}'.

This endpoint is to check if the bot server is really running.
</content>
</entry>
<entry>
<title>telegram/bot: move Webhook options initialization to separate method</title>
<updated>2024-04-16T17:50:19Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2024-04-16T17:50:19Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=a1b5275b85b05b6aba46cf431a79919746157bfc'/>
<id>urn:sha1:a1b5275b85b05b6aba46cf431a79919746157bfc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>telegram/bot: fix Webhook URL registration</title>
<updated>2024-04-16T17:41:56Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2024-04-16T17:41:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=d07c7fa5d474e95a3bcae01bdb385cb5727fb970'/>
<id>urn:sha1:d07c7fa5d474e95a3bcae01bdb385cb5727fb970</id>
<content type='text'>
Using [path.Join] cause "https://domain" become "https:/domain" which
is not a valid URL.
</content>
</entry>
<entry>
<title>go.mod: update all dependencies</title>
<updated>2024-04-13T08:38:53Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2024-04-13T08:38:53Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=c4546dce4e83a3cf84ec879117825293aa0686ff'/>
<id>urn:sha1:c4546dce4e83a3cf84ec879117825293aa0686ff</id>
<content type='text'>
</content>
</entry>
<entry>
<title>lib/dns: make server accept record type ANY</title>
<updated>2024-04-13T08:36:44Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2024-04-13T08:36:44Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=45775b26680a8ad06e5e0a334301fa4b5b91af2c'/>
<id>urn:sha1:45775b26680a8ad06e5e0a334301fa4b5b91af2c</id>
<content type='text'>
The record type ANY contains multiple A, AAAA or any known resource
records that we already support.
</content>
</entry>
</feed>
