<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pakakeh.go/lib/os/exec/exec_test.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-01-15T10:26:33Z</updated>
<entry>
<title>all: convert license and copyright to use SPDX identifiers</title>
<updated>2026-01-15T10:26:33Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2026-01-15T10:14:54Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=7db8c302e1396eda40cd6a1e57f58ed791448556'/>
<id>urn:sha1:7db8c302e1396eda40cd6a1e57f58ed791448556</id>
<content type='text'>
With help of spdxconv tool [1], we able to bulk update all files license
and copyright format to comply with SPDX formats.

[1] https://kilabit.info/project/spdxconv/
</content>
</entry>
<entry>
<title>all: fix various linter warnings</title>
<updated>2024-09-03T18:09:51Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2024-09-02T17:36:12Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=bea911e27eb064653e46493320d3a15061672acc'/>
<id>urn:sha1:bea911e27eb064653e46493320d3a15061672acc</id>
<content type='text'>
While at it, temporary disable gosec due to excessive report for G115,
which may be true, but may also break the current working program.
We should alter and fix once we can test and make sure that it does not
breaks.
</content>
</entry>
<entry>
<title>all: move the repository to "git.sr.ht/~shulhan/pakakeh.go"</title>
<updated>2024-03-02T08:59:46Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2024-03-01T20:07:33Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=901c9803e6f93e0d5ee282f4061309022c46f490'/>
<id>urn:sha1:901c9803e6f93e0d5ee282f4061309022c46f490</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>os/exec: fix escaped quote inside the same quote</title>
<updated>2021-09-03T17:30:41Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2021-09-03T17:30:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=a4c7e73e12157957e12a3f70b42e173b97374eec'/>
<id>urn:sha1:a4c7e73e12157957e12a3f70b42e173b97374eec</id>
<content type='text'>
Shell quote is a hell of complex.  For example, one can write
shell that execute command that contains quote,

  sh -c "psql -c 'CREATE ... IDENTIFIED BY PASSWORD '\''pass'\'''"

or to simplify,

  sh -c "psql -c \"CREATE ... IDENTIFIED BY PASSWORD 'pass'\""
</content>
</entry>
<entry>
<title>Revert "os/exec: include the quoted characters when ParseCommandArgs"</title>
<updated>2021-08-21T11:49:28Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2021-08-21T11:38:38Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=e427fe4fe530de6dc750375f8ff6fad891f65567'/>
<id>urn:sha1:e427fe4fe530de6dc750375f8ff6fad891f65567</id>
<content type='text'>
This reverts commit 1adcb7901dc62ef288cf82f504f8fae30068b21b.

Reason for revert:

Given the following string statement: `sh -c "echo a"`, the
ParseCommandArgs will return

  cmd: "sh"
  args: []string{`-c`, `"echo a"`}

If we pass this to exec.Command(cmd, args) and call Run, it will return
an error

  sh: line 1: echo a: command not found
</content>
</entry>
<entry>
<title>os/exec: include the quoted characters when ParseCommandArgs</title>
<updated>2021-08-13T06:32:57Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2021-08-12T16:39:53Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=1adcb7901dc62ef288cf82f504f8fae30068b21b'/>
<id>urn:sha1:1adcb7901dc62ef288cf82f504f8fae30068b21b</id>
<content type='text'>
Previously, if we pass `a "b c"` to ParseCommanArgs, it will return
`a` as command and `b c` in args.

Now, it will return `"b c"` in args with double quotes.
</content>
</entry>
<entry>
<title>os/exec: check for escaped backslash when ParseCommandArgs</title>
<updated>2021-08-11T06:26:17Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2021-08-11T06:26:17Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=8148fdb18dbcf22a9c9c724fc9b22b8adb5ee7dd'/>
<id>urn:sha1:8148fdb18dbcf22a9c9c724fc9b22b8adb5ee7dd</id>
<content type='text'>
Given the following string "cmd /a\ b" to ParseCommandArgs now it should
return "cmd" and ["/a b"] not ["/a\", "b"], because the space after a
is escaped using backslash.
</content>
</entry>
<entry>
<title>all: refactoring the test.Assert and test.AssertBench signature</title>
<updated>2021-03-14T15:40:05Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2021-03-14T15:37:59Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=e7552ad0189f761875bc1c2ca3dd716d43a01e0d'/>
<id>urn:sha1:e7552ad0189f761875bc1c2ca3dd716d43a01e0d</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>os/exec: new package to simplify the standard "os/exec"</title>
<updated>2020-06-03T17:26:16Z</updated>
<author>
<name>Shulhan</name>
<email>m.shulhan@gmail.com</email>
</author>
<published>2020-06-03T17:26:16Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=427251e6f320849022e55510051797a10d4e9d83'/>
<id>urn:sha1:427251e6f320849022e55510051797a10d4e9d83</id>
<content type='text'>
New extension to standard package is function ParseCommandArgs() that
receive input as string and return itas command and list of arguments.
Unlike strings.Fields() which only separated the field by space,
ParseCommandArgs can detect possible single, double, or back quotes.

Another extension is Run() function that accept the string command
to be executed and their standard output and error.
</content>
</entry>
</feed>
