<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pakakeh.go, branch v0.38.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.38.0</id>
<link rel='self' href='http://git.kilabit.info/pakakeh.go/atom?h=v0.38.0'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/'/>
<updated>2022-05-31T16:05:05Z</updated>
<entry>
<title>Release share v0.38.0 (2022-06-05)</title>
<updated>2022-05-31T16:05:05Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-05-31T16:05:05Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=ceac4a8b1ee83af6d0c29528617adf7a02907bb4'/>
<id>urn:sha1:ceac4a8b1ee83af6d0c29528617adf7a02907bb4</id>
<content type='text'>
This release update the minimum Go version to 1.17.

=== Breaking changes

* lib/dns: move all caches operations from Server to Caches type

  Previously all caches operation are tied to the Server type.

  In order to separate the responsibilities between server and caches,
  we move all caches operations to Cache type.

* lib/dns: change the Zone SOA field type from ResourceRecord to RDataSOA

  Using the RDataSOA type directly minimize interface check and
  conversion.

===  Enhancements

* lib/dns: replace Ticker with Timer on Caches’ worker

  Since the worker call time.Now() inside the body, we can minimize it
  by using Timer.

* lib/dns: export the Caches type and field on Server

  The idea is move all server’s caches operations (methods) to this type
  later.

* lib/dns: split storage between internal and external caches

  Previously, the indexed caches for internal (records from hosts or zone
  files) and external (records from parent name servers) are stored
  inside single map.

  This changes split those internal and external caches into two maps,
  so any operation on one caches does not affect the other one, and vice
  versa.

* lib/dns: return the removed record on caches RemoveCachesByRR

  If the record being removed found on caches, it will return it;
  otherwise it will return nil without error.

* lib/dns: disable JSON marshaling Zone Records field

  On service that manage many zones, providing an API to fetch list of
  zones only will return large payload if we include the Records field
  in the response.

  So, it is recommended to provide another API to fetch the records on
  specific zone.

* lib/dns: print the field Value on ResourceRecord Stringer instead of rdlen

* lib/dns: export the zoneRecords type

  Since the Zone type is exported and its contains exported field Records
  with type zoneRecords, then that field type should also exported.

* lib/dns: return the deleted record on HostsFile RemoveRecord

  Previously, the RemoveRecord method on HostsFile return a boolean true
  if the record found.

  This changes the return type to the ResourceRecord being deleted, to
  allow the caller inspect and/or print the record.

===  Chores

* all: rewrite all codes to use "var" instead of ":="

  Using ":=" simplify the code but we lose the type. For example,

    v := F()

  The only way we know what the type of v is by inspecting the function F.
  Another disadvantages of using ":=" may cause extra variables allocation
  where two or more variables with same type is declared inside body of
  function where it could be only one.

  While at it, we split the struct for test case into separate type.

* lib/memfs: format comment in embedded Go template according to gofmt tip

  In the next gofmt (Go v1.19), the comment format does not allow empty
  lines "//" at the top and bottom of the comment.

  This changes make the generated Go code from Embed method to match as
  close as possible with output of gofmt.
</content>
</entry>
<entry>
<title>all: reformat CHANGELOG to use _ instead of . for anchor</title>
<updated>2022-05-31T14:51:11Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-05-31T14:51:11Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=8059730f2784d32da1629482d8b38805970280aa'/>
<id>urn:sha1:8059730f2784d32da1629482d8b38805970280aa</id>
<content type='text'>
Using . for reference ID break anchor on unsupported browser.
</content>
</entry>
<entry>
<title>lib/dns: replace Ticker with Timer on Caches' worker</title>
<updated>2022-05-30T15:44:28Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-05-29T16:20:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=00c9ec17e4f71989f24eb1df66a2b0af8b8dd509'/>
<id>urn:sha1:00c9ec17e4f71989f24eb1df66a2b0af8b8dd509</id>
<content type='text'>
Since the worker call time.Now() inside the body, we can minimize it
by using Timer.
</content>
</entry>
<entry>
<title>lib/dns: move all caches operations from Server to Caches type</title>
<updated>2022-05-30T15:44:28Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-05-28T07:39:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=d3c7d2231f02167c33fdf27032c62d011d0992dc'/>
<id>urn:sha1:d3c7d2231f02167c33fdf27032c62d011d0992dc</id>
<content type='text'>
Previously all caches operation are tied to the Server type.

In order to separate the responsibilities between server and caches,
we move all caches operations to Cache type.
</content>
</entry>
<entry>
<title>lib/dns: export the Caches type and field on Server</title>
<updated>2022-05-30T15:44:28Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-05-28T06:52:27Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=91855910f469cb48a40522956f63b4640e4b0b9b'/>
<id>urn:sha1:91855910f469cb48a40522956f63b4640e4b0b9b</id>
<content type='text'>
The idea is move all server's caches operations (methods) to this
type later.
</content>
</entry>
<entry>
<title>lib/dns: split storage between internal and external caches</title>
<updated>2022-05-30T15:44:28Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-05-28T06:11:19Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=f6e891bf04d1cade5537bee2710ede5053060e3b'/>
<id>urn:sha1:f6e891bf04d1cade5537bee2710ede5053060e3b</id>
<content type='text'>
Previously, the indexed caches for internal (records from hosts or zone
files) and external (records from parent name servers) are stored inside
single map.

This changes split those internal and external caches into two maps,
so any operation on one caches does not affect the other one, and vice
versa.
</content>
</entry>
<entry>
<title>go.mod: update the minimum Go version to 1.17</title>
<updated>2022-05-24T02:30:24Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-05-24T02:30:24Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=f2ff6f21ef71efebf3ce6c3d6f6c3f6a9a42005a'/>
<id>urn:sha1:f2ff6f21ef71efebf3ce6c3d6f6c3f6a9a42005a</id>
<content type='text'>
While at it, update all dependencies.
</content>
</entry>
<entry>
<title>lib/dns: return the removed record on caches RemoveCachesByRR</title>
<updated>2022-05-17T15:16:46Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-05-17T15:16:46Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=345ee16b214a7a8cd3ca5d396a7c55a3a85b1bc2'/>
<id>urn:sha1:345ee16b214a7a8cd3ca5d396a7c55a3a85b1bc2</id>
<content type='text'>
If the record being removed found on caches, it will return it;
otherwise it will return nil without error.
</content>
</entry>
<entry>
<title>lib/dns: disable JSON marshaling Zone Records field</title>
<updated>2022-05-16T08:56:38Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-05-16T08:56:38Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=a44f87fbd19b1f9e2d99fbf1aefb91f13ebff6e3'/>
<id>urn:sha1:a44f87fbd19b1f9e2d99fbf1aefb91f13ebff6e3</id>
<content type='text'>
On service that manage many zones, providing an API to fetch list of
zones only will return large payload if we include the Records field
in the response.

So, it is recommended to provide another API to fetch the records on
specific zone.
</content>
</entry>
<entry>
<title>lib/dns: print the field Value on ResourceRecord Stringer instead of rdlen</title>
<updated>2022-05-16T06:11:09Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-05-16T06:11:09Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=3f8e9c633334851626a94df36517ee29bf2d8c90'/>
<id>urn:sha1:3f8e9c633334851626a94df36517ee29bf2d8c90</id>
<content type='text'>
</content>
</entry>
</feed>
