<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pakakeh.go, branch v0.25.1</title>
<subtitle>Collections of packages and tools for working with Go programming language.</subtitle>
<id>http://git.kilabit.info/pakakeh.go/atom?h=v0.25.1</id>
<link rel='self' href='http://git.kilabit.info/pakakeh.go/atom?h=v0.25.1'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/'/>
<updated>2021-04-06T12:43:41Z</updated>
<entry>
<title>Release share v0.25.1 (2021-04-06)</title>
<updated>2021-04-06T12:43:41Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2021-04-06T12:43:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=ba20dd55c85a0222a776bcddf2e563d34d1a4dbe'/>
<id>urn:sha1:ba20dd55c85a0222a776bcddf2e563d34d1a4dbe</id>
<content type='text'>
Set the minimum Go version to 1.16

Commit 4cdd6b01c1 "http: add method to generate standard HTTP request
on Client" use the io.NopCloser thats only available in Go 1.16.  Either
we move backward by replacing it with ioutil.NopCloser or we move forward
by setting the minimum Go version to 1.16.

We choose to move forward.
</content>
</entry>
<entry>
<title>go.mod: set the minimum Go version to 1.16</title>
<updated>2021-04-06T12:42:12Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2021-04-06T12:42:12Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=11b20e5fdc1b47349e70c0c8075c116aefe45685'/>
<id>urn:sha1:11b20e5fdc1b47349e70c0c8075c116aefe45685</id>
<content type='text'>
Commit 4cdd6b01c1 "http: add method to generate standard HTTP request
on Client" use the io.NopCloser thats only available in Go 1.16.  Either
we move backward by replacing it with ioutil.NopCloser or we move forward
by setting the minimum Go version to 1.16.

We choose to move forward.
</content>
</entry>
<entry>
<title>Release share v0.25.0</title>
<updated>2021-04-06T01:09:36Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2021-04-06T01:09:36Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=82629a91da42c3932cb0660b11104884a6ff608b'/>
<id>urn:sha1:82629a91da42c3932cb0660b11104884a6ff608b</id>
<content type='text'>
===  Breaking changes

*  all: refactoring the test.Assert and test.AssertBench signature

   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.

*  all: refactoring http.Client methods signature

   Previously, parameters to method Delete, Get, Post, PostForm, PostFormData,
   PostJSON, Put, and PutJSON are in the following order:

     (headers, path, params)

   This is sometimes confusing. To make it better and works with format
   of HTTP request header,

     METHOD PATH
     HEADERS

     PARAMS

   we move the path to the first parameter and headers as the second
   parameter, so the call to client methods would be

     (path, headers, params)

*  http: remove parameter contentType on Client method Put

   Since one can set the Content-Type in parameter headers, this parameter is
   become redundant.

===  New features

* http: add method to generate standard HTTP request on Client

  The GenerateHttpRequest method generate http.Request instance from
  method, path, requestType, headers, and params.

  For HTTP method GET, CONNECT, DELETE, HEAD, OPTIONS, or TRACE; the params
  value should be nil or url.Values.
  If its url.Values, then the params will be encoded as query parameters.

  For HTTP method is PATCH, POST, or PUT; the params will converted based on
  requestType rules below,

    * If requestType is RequestTypeQuery and params is url.Values it will be
      added as query parameters in the path.

    * If requestType is RequestTypeForm and params is url.Values it will be
      added as URL encoded in the body.

    * If requestType is RequestTypeMultipartForm and params type is
      map[string][]byte, then it will be converted as multipart form in the
      body.

    * If requestType is RequestTypeJSON and params is not nil, the params will
      be encoded as JSON in body.

* ssh: ask for passphrase if private key is encrypted on generateSigners

  In case the private key defined in IdentityFile is encrypted, prompt
  for the passphrase on the screen and read it from stdin using
  terminal.ReadPassword().

  This changes also remove call to generateSigners on postConfig(),
  instead invoke it from NewClient() to minimize multiple calls to
  generateSigners().

* ssh: use the SSH agent to authenticate on NewClient

  Previously, the client use the IdentityFile on ConfigSection to
  Authenticate with the remote SSH server.  In case the IdentityFile is
  Encrypted with passphrase, each time NewClient is invoked it will ask
  For passphrase.

  To minimize inputing the passphrase, we check if current use run the
  SSH agent through SSH_AUTH_SOCK environment variable and use the agent
  To generate signers.

  This method need manual key added by user to SSH agent before calling
  NewClient to make it works.

===  Enhancements

* xmlrpc: add debug statements to print request and response

  The debug level is set minimum to 3. If its set it will print the
  request and response to standard output.
</content>
</entry>
<entry>
<title>websocket: suppress error on calling handleClose</title>
<updated>2021-04-06T01:08:02Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2021-04-06T01:08:02Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=d3cd3a6a6fcadc2f022c3965f54e238c791b9ca9'/>
<id>urn:sha1:d3cd3a6a6fcadc2f022c3965f54e238c791b9ca9</id>
<content type='text'>
The handleClose is  a function that will be called when client receive
control CLOSE frame from server.  Default handle is to response
with control CLOSE frame with the same payload.
This field is not exported, and only defined to allow testing.
</content>
</entry>
<entry>
<title>ssh: use the SSH agent to authenticate on NewClient</title>
<updated>2021-04-06T01:00:55Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2021-04-06T00:59:43Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=dc303a8dab42522181e401687f1363c7bb11874b'/>
<id>urn:sha1:dc303a8dab42522181e401687f1363c7bb11874b</id>
<content type='text'>
Previously, the client use the IdentityFile on ConfigSection to
authenticate with the remote SSH server.  In case the IdentityFile is
encrypted with passphrase, each time NewClient is invoked it will ask
for passphrase.

To minimize inputing the passphrase, we check if current use run the
SSH agent through SSH_AUTH_SOCK environment variable and use the agent
to generate signers.

This method need manual key added by user to SSH agent before calling
NewClient to make it works.
</content>
</entry>
<entry>
<title>ssh: ask for passphrase if private key is encrypted on generateSigners</title>
<updated>2021-04-04T18:32:55Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2021-04-04T17:54:35Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=774f7f341eee1de4dd7cf719e88bfee9bcea9570'/>
<id>urn:sha1:774f7f341eee1de4dd7cf719e88bfee9bcea9570</id>
<content type='text'>
In case the private key defined in IdentityFile is encrypted, prompt
for the passphrase on the screen and read it from stdin using
term.ReadPassword().

This changes also remove call to generateSigners on postConfig(),
instead invoke it from NewClient() to minimize multiple calls to
generateSigners().
</content>
</entry>
<entry>
<title>go.mod: update all dependencies</title>
<updated>2021-04-04T17:46:58Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2021-04-04T17:46:58Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=a211773aba0da9fbd642c2a4a172cc90efaf02d5'/>
<id>urn:sha1:a211773aba0da9fbd642c2a4a172cc90efaf02d5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>http: add method to generate standard HTTP request on Client</title>
<updated>2021-03-27T14:39:30Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2021-03-27T14:37:35Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=4cdd6b01c14b64331a8a3f9660368cd09f215a8c'/>
<id>urn:sha1:4cdd6b01c14b64331a8a3f9660368cd09f215a8c</id>
<content type='text'>
The GenerateHttpRequest method generate http.Request instance from
method, path, requestType, headers, and params.

For HTTP method GET, CONNECT, DELETE, HEAD, OPTIONS, or TRACE; the params
value should be nil or url.Values.
If its url.Values, then the params will be encoded as query parameters.

For HTTP method is PATCH, POST, or PUT; the params will converted based on
requestType rules below,

* If requestType is RequestTypeQuery and params is url.Values it will be
  added as query parameters in the path.

* If requestType is RequestTypeForm and params is url.Values it will be
  added as URL encoded in the body.

* If requestType is RequestTypeMultipartForm and params type is
  map[string][]byte, then it will be converted as multipart form in the
  body.

* If requestType is RequestTypeJSON and params is not nil, the params will
  be encoded as JSON in body.

Signed-off-by: Shulhan &lt;ms@kilabit.info&gt;
</content>
</entry>
<entry>
<title>xmlrpc: add debug statements to print request and response</title>
<updated>2021-03-21T09:21:44Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2021-03-21T09:21:44Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=d4f1f279b6310bd3af3972066fbf991bd12fc1a3'/>
<id>urn:sha1:d4f1f279b6310bd3af3972066fbf991bd12fc1a3</id>
<content type='text'>
The debug level is set minimum to 3. If its set it will print the
request and response to standard output.
</content>
</entry>
<entry>
<title>http: add new line on debug output of doRequest</title>
<updated>2021-03-21T09:20:04Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2021-03-21T09:20:04Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=d00fad7a868579f05e969dee272db5311af7ea9d'/>
<id>urn:sha1:d00fad7a868579f05e969dee272db5311af7ea9d</id>
<content type='text'>
</content>
</entry>
</feed>
