| Age | Commit message (Collapse) | Author |
|
Since Go 1.20, the standard bytes package have the Copy function.
Since Go 1.22, the standard slices package have the Concat function.
|
|
There are several reasons that why we move from github.com.
First, related to the name of package.
We accidentally name the package with "share" a common word in English
that does not reflect the content of repository.
By moving to other repository, we can rename it to better and unique
name, in this "pakakeh.go".
Pakakeh is Minang word for tools, and ".go" suffix indicate that the
repository related to Go programming language.
Second, supporting open source.
The new repository is hosted under sourcehut.org, the founder is known
to support open source, and all their services are licensed under AGPL,
unlike GitHub that are closed sources.
Third, regarding GitHub CoPilot.
The GitHub Terms of Service [1], allow any public content that are hosted
there granted them to parse the content.
On one side, GitHub helps and flourish the open source, but on another
side have an issues regarding scraping the copyleft license [2].
[1]: https://docs.github.com/en/site-policy/github-terms/github-terms-of-service#4-license-grant-to-us
[2]: https://githubcopilotinvestigation.com
|
|
Changes,
* Client: from 176 to 144 (-32 bytes)
* ClientManager: from 64 to 40 (-24 bytes)
* Request: from 88 to 72 (-16 bytes)
* Response: from 40 to 24 (-16 bytes)
* route: from 48 to 32 (-16 bytes)
* Server: from 72 to 64 (-8 bytes)
* ServerOptions: from 104 to 96 (s-8 bytes)
Plus other structs in the tests.
|
|
Previously, the test.Assert and test.AssertBench functions has the
boolean parameter to print the stack trace of test in case its not equal.
Since this parameter is not mandatory and its usually always set to
"true", we remove them from function signature to simplify the call
to Assert and AssertBench.
|
|
|
|
Previously, we use two function to unpack frame: frameUnpack and
continueUnpack, both of this functions actually use the same logic.
This commit merge both functions into Frame's unpack() and which also
make handleChopped() to be unused on both server and client.
|
|
The opcode type is required to create new frame and to get the opcode in
continous frames.
|
|
Some of the methods in ClientManager and Frames should be only accessed
by internal server, not by implementor.
|
|
function Concat in package bytes is more flexible, allow two or more slice
of byte in parameters.
|
|
Continuing refactor, the Frames type provide methods than can used to
handle packet from other endpoint.
|
|
Continuing refactor, this commit unexport all fields in Frame to allow
user focus working with method and packet, let the technical detail
managed by library.
|
|
Most of the constants should not be used directly, as we prefer user to
use the functions or methods based access.
|
|
A type Frames is actually a wrapper to slice of frame. We prefer if
user is not directly access to underlying frames but focus on payload
instead.
|