<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pakakeh.go/lib/bytes/bytes.go, branch dev</title>
<subtitle>Collections of packages and tools for working with Go programming language.</subtitle>
<id>http://git.kilabit.info/pakakeh.go/atom?h=dev</id>
<link rel='self' href='http://git.kilabit.info/pakakeh.go/atom?h=dev'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/'/>
<updated>2026-04-04T20:52:47Z</updated>
<entry>
<title>all: apply go fix</title>
<updated>2026-04-04T20:52:47Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2026-04-04T20:50:32Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=778fd16011ec1d39c41b62372dc65f045183266e'/>
<id>urn:sha1:778fd16011ec1d39c41b62372dc65f045183266e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>all: use for-range with numeric</title>
<updated>2025-01-22T20:41:10Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2025-01-22T20:40:50Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=2a0694d2fa577574b505c4635eb8a824eaf88ddc'/>
<id>urn:sha1:2a0694d2fa577574b505c4635eb8a824eaf88ddc</id>
<content type='text'>
Go 1.22 now support for-range on numeric value.
</content>
</entry>
<entry>
<title>all: replace [lib/bytes.WriteXxx] with standard library</title>
<updated>2025-01-22T17:01:35Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2025-01-22T16:44:59Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=7041153f3c1f464464cbf8faf7541821dc33e14d'/>
<id>urn:sha1:7041153f3c1f464464cbf8faf7541821dc33e14d</id>
<content type='text'>
The "encoding/binary.BigEndian" in standard library provides method
PutXxx that do the same thing.
</content>
</entry>
<entry>
<title>all: replace "lib/bytes.ReadXxx" with standard library</title>
<updated>2025-01-22T17:00:38Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2025-01-22T16:27:48Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=7f52c92fab6a49149643feeb9b3e5c06ef249ec1'/>
<id>urn:sha1:7f52c92fab6a49149643feeb9b3e5c06ef249ec1</id>
<content type='text'>
Package "encoding/binary" from standard library support reading integer
from bytes using BigEndian, LittleEndian variables.
</content>
</entry>
<entry>
<title>all: replace "lib/bytes.AppendXxx" with standard library</title>
<updated>2025-01-22T17:00:30Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2025-01-22T16:16:24Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=8ad0d7cc01c08f60402d3d18df5dea13bfd94ece'/>
<id>urn:sha1:8ad0d7cc01c08f60402d3d18df5dea13bfd94ece</id>
<content type='text'>
Since Go 1.19, package "encoding/binary.BigEndian" support appending
byte order.
</content>
</entry>
<entry>
<title>lib/bytes: replace Copy and Concat with standard library</title>
<updated>2025-01-22T14:34:16Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2025-01-22T14:33:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=360cd7bdc721c2aa968e2f6888db1c7e36538ae2'/>
<id>urn:sha1:360cd7bdc721c2aa968e2f6888db1c7e36538ae2</id>
<content type='text'>
Since Go 1.20, the standard bytes package have the Copy function.
Since Go 1.22, the standard slices package have the Concat function.

</content>
</entry>
<entry>
<title>lib/bytes: split the hexdump related functions to separate package</title>
<updated>2024-12-28T09:46:59Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2024-12-28T09:22:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=c1aab5c376dfa1845b839f1c4b9876a1412a8d24'/>
<id>urn:sha1:c1aab5c376dfa1845b839f1c4b9876a1412a8d24</id>
<content type='text'>
Package hexdump implements reading and writing bytes from and into
hexadecimal number.
It support parsing output from hexdump(1) tool.
</content>
</entry>
<entry>
<title>lib/bytes: add function AppendInt64 and AppendUint64</title>
<updated>2024-09-30T16:04:56Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2024-09-25T16:57:01Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=04ab5cfb262c8dbdadf2090bde99506ff2eac5a9'/>
<id>urn:sha1:04ab5cfb262c8dbdadf2090bde99506ff2eac5a9</id>
<content type='text'>
The AppendInt64 append an int64 value into slice of byte.
The AppendUint64 append an uint64 value into slice of byte.
</content>
</entry>
<entry>
<title>lib/bytes: add parameter networkByteOrder to ParseHexDump</title>
<updated>2024-03-26T16:07:02Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2024-03-26T15:43:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=f4a86000adc2284b2c4f3c68b464b04438dd70f6'/>
<id>urn:sha1:f4a86000adc2284b2c4f3c68b464b04438dd70f6</id>
<content type='text'>
If networkByteOrder is true, the ParseHexDump read each hex string
in network byte order or as order defined in text.

While at it, fix reading and parsing single byte hex.
</content>
</entry>
<entry>
<title>all: comply with linter recommendations #2</title>
<updated>2024-03-05T07:53:12Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2024-03-02T21:59:34Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=2fa7605727e90ca323b7b24168632e485d74c583'/>
<id>urn:sha1:2fa7605727e90ca323b7b24168632e485d74c583</id>
<content type='text'>
HTTP request now implicitly create request with context.

Any false positive related to not closing HTTP response body has been
annotated with "nolint:bodyclose".

In the example code, use consistent "// Output:" comment format, by
prefixing with single space.
Any comment on code now also prefixing with single space.

An error returned without variables now use [errors.New] instead of
[fmt.Errorf].
Any error returned using [fmt.Errorf] now wrapped using "%w" instead of
"%s".
Also, replace error checking using [errors.Is] or [errors.As], instead
of using equal/not-equal operator.

Any statement like "x = x OP y" now replaced with "x OP= y".
Also, swap statement is simplified using "x, y = y, x".
Any switch statement with single case now replaced with if-condition.

Any call to defer on function or program that call [os.Exit], now
replaced by calling the deferred function directly.

Any if-else condition now replaced with switch statement, if possible.
</content>
</entry>
</feed>
