summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.adoc90
-rw-r--r--README.adoc3
-rw-r--r--_doc/CHANGELOG.html409
-rw-r--r--_doc/index.html8
-rw-r--r--go.mod6
-rw-r--r--go.sum12
-rw-r--r--share.go6
7 files changed, 423 insertions, 111 deletions
diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc
index 9dc99c26..b3751d85 100644
--- a/CHANGELOG.adoc
+++ b/CHANGELOG.adoc
@@ -7,14 +7,20 @@ This library is released each month, usually at the first week of month.
=== Breaking changes
+* dns: refactoring loading hosts and master files
+
+ Instead of as methods in Server, we detach the LoadHostDir and
+ LostMasterDir into functions that return list of filename and their
+ content.
+
* dns: disable serving DoH and DoT if port is not set (0)
-Previously, if HTTPPort or TLSPort is not set (0) we set it to default
-value and keep serving the DNS over HTTP and TLS. Sometimes, user may
-want to serve DNS over UDP only.
+ Previously, if HTTPPort or TLSPort is not set (0) we set it to default
+ value and keep serving the DNS over HTTP and TLS. Sometimes, user may
+ want to serve DNS over UDP only.
-This changes disable serving DNS over HTTP (DoH) and TLS (DoT) if port
-is not set, or 0.
+ This changes disable serving DNS over HTTP (DoH) and TLS (DoT) if port
+ is not set, or 0.
* email: rename ParseAddress function to ParseMailboxes
@@ -22,22 +28,84 @@ is not set, or 0.
* ini: fix inconsistencies between empty string and boolean true
-In Git specification, an empty variable is equal to boolean true.
-This cause inconsistency between empty string and boolean true.
+ In Git specification, an empty variable is equal to boolean true.
+ This cause inconsistency between empty string and boolean true.
+
+* memfs: simplify the API, add directory parameter to New
+
+ This changes add parameter directory to be mounted in New(), so user
+ did not need to call Mount manually
+
+ This cause the Mount method and its sibling, Unmount and IsMounted
+ become unneeded, so we remove them.
+
+=== Bug fixes
+
+* api/telegram/bot: fix request parameter on GetMyCommands
=== New features
+* bytes: add function MergeSpaces
+
+ The function MergeSpaces will convert sequences of white space into
+ single space ' '.
+
+* email: add methods to unmarshal/marshal Mailbox from/to JSON
+* email: add function to parse single mailbox
+* email: add function to create multipart text and HTML message
+
* http: support CORS with white list of origin and headers
+
* ini: add method UnsetAll to remove all variables in section and/or
subsection that match with the key
+* ini: add method to Unmarshal ini values to struct
+
* os/exec: new package to simplify the standard "os/exec"
+ 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.
+
+* sql: add method to migrate database schema
+
+ The Migrate method migrate the database using list of SQL files inside
+ a directory.
+ Each SQL file in directory will be executed in alphabetical order based on
+ the last state.
+
+ The state of migration will be saved in table "_migration" with the SQL
+ file name that has been executed and the timestamp.
+
=== Enhancements
-* email: add methods to unmarshal/marshal Mailbox from/to JSON
-* email: add function to parse single mailbox
-* email: add function to create multipart text and HTML message
+* api/telegram/bot: delete webhook upon setting new webhook
+
+* dns: do not load hidden hosts and master file
+
+ Previously, the LoadHostDir and LoadMasterDir load all files inside
+ the directory without checking if its hidden (starting with dot) or not.
+
+ This changes make the hidden file not loaded so one can disable it
+ temporarily by prefixing it with dot.
+
* ini: make the add method append the variable after existing same key
+
+* memfs: make the Node Readdir works when calling from generated Go code
+
+ Previously, the Go generated code from call to GoGenerate() set only
+ mapping of path to node. Calling Readdir() using http.File using
+
+ root, err := mfs.Open("/")
+ fis, err := root.Readdir(0)
+
+ will return nil on fis.
+
+ This changes add all child nodes to generated node.
+
* websocket: allow "https" scheme on Client's Endpoint
@@ -53,7 +121,7 @@ This cause inconsistency between empty string and boolean true.
* ssh: implement SSH client configuration parser -- ssh_config(5)
* api/telegram/bot: Go package for Telegram API Bot
* http: implement a simplified HTTP client
-* net/html: new package to simplify the golang.org/x/net/html
+* net/html: new package to simplify the golang.org/x/net/html
The x/net/html package currently only provide bare raw functionalities
to iterate tree, there is no check for empty node, no function to
diff --git a/README.adoc b/README.adoc
index 6352beff..e0d84bc0 100644
--- a/README.adoc
+++ b/README.adoc
@@ -138,6 +138,9 @@ written in Go.
* link:{url-godoc}/lib/numbers[*numbers*]: A library for working with
integer, float, slice of integer, and slice of floats.
+* link:{url-godoc}/lib/os/exec[*os/exec*]: Package exec wrap the standar package
+"os/exec" to simplify calling Run with stdout and stderr.
+
* link:{url-godoc}/lib/parser[*parser*]: Package parser provide a common text
parser, using delimiters.
diff --git a/_doc/CHANGELOG.html b/_doc/CHANGELOG.html
index c0cfb213..fc90c858 100644
--- a/_doc/CHANGELOG.html
+++ b/_doc/CHANGELOG.html
@@ -235,15 +235,15 @@ dd {
<div id="toc" class="toc">
<div id="toctitle">Table of Contents</div>
<ul class="sectlevel1">
-<li><a href="#_share_v0_15_0_2020_05_04">share v0.15.0 (2020-05-04)</a>
+<li><a href="#_share_v0_16_0_2020_06_05">share v0.16.0 (2020-06-05)</a>
<ul class="sectlevel2">
<li><a href="#_breaking_changes">Breaking changes</a></li>
+<li><a href="#_bug_fixes">Bug fixes</a></li>
<li><a href="#_new_features">New features</a></li>
<li><a href="#_enhancements">Enhancements</a></li>
-<li><a href="#_bug_fixes">Bug fixes</a></li>
</ul>
</li>
-<li><a href="#_share_v0_14_0_2020_04_03">share v0.14.0 (2020-04-03)</a>
+<li><a href="#_share_v0_15_0_2020_05_04">share v0.15.0 (2020-05-04)</a>
<ul class="sectlevel2">
<li><a href="#_breaking_changes_2">Breaking changes</a></li>
<li><a href="#_new_features_2">New features</a></li>
@@ -251,23 +251,23 @@ dd {
<li><a href="#_bug_fixes_2">Bug fixes</a></li>
</ul>
</li>
-<li><a href="#_share_v0_13_0_2020_03_11">share v0.13.0 (2020-03-11)</a>
+<li><a href="#_share_v0_14_0_2020_04_03">share v0.14.0 (2020-04-03)</a>
<ul class="sectlevel2">
<li><a href="#_breaking_changes_3">Breaking changes</a></li>
<li><a href="#_new_features_3">New features</a></li>
<li><a href="#_enhancements_3">Enhancements</a></li>
-<li><a href="#_bug_fixes_3">Bug Fixes</a></li>
+<li><a href="#_bug_fixes_3">Bug fixes</a></li>
</ul>
</li>
-<li><a href="#_share_v0_12_0_2020_02_13">share v0.12.0 (2020-02-13)</a>
+<li><a href="#_share_v0_13_0_2020_03_11">share v0.13.0 (2020-03-11)</a>
<ul class="sectlevel2">
<li><a href="#_breaking_changes_4">Breaking changes</a></li>
<li><a href="#_new_features_4">New features</a></li>
<li><a href="#_enhancements_4">Enhancements</a></li>
-<li><a href="#_bug_fixes_4">Bug fixes</a></li>
+<li><a href="#_bug_fixes_4">Bug Fixes</a></li>
</ul>
</li>
-<li><a href="#_share_v0_11_0_2019_12_26">share v0.11.0 (2019-12-26)</a>
+<li><a href="#_share_v0_12_0_2020_02_13">share v0.12.0 (2020-02-13)</a>
<ul class="sectlevel2">
<li><a href="#_breaking_changes_5">Breaking changes</a></li>
<li><a href="#_new_features_5">New features</a></li>
@@ -275,91 +275,99 @@ dd {
<li><a href="#_bug_fixes_5">Bug fixes</a></li>
</ul>
</li>
-<li><a href="#_share_v0_10_2_2019_12_07">share v0.10.2 (2019-12-07)</a>
+<li><a href="#_share_v0_11_0_2019_12_26">share v0.11.0 (2019-12-26)</a>
<ul class="sectlevel2">
-<li><a href="#_bug_fixes_6">Bug Fixes</a></li>
+<li><a href="#_breaking_changes_6">Breaking changes</a></li>
+<li><a href="#_new_features_6">New features</a></li>
+<li><a href="#_enhancements_6">Enhancements</a></li>
+<li><a href="#_bug_fixes_6">Bug fixes</a></li>
</ul>
</li>
-<li><a href="#_share_v0_10_1_2019_12_05">share v0.10.1 (2019-12-05)</a>
+<li><a href="#_share_v0_10_2_2019_12_07">share v0.10.2 (2019-12-07)</a>
<ul class="sectlevel2">
<li><a href="#_bug_fixes_7">Bug Fixes</a></li>
-<li><a href="#_enhancements_6">Enhancements</a></li>
</ul>
</li>
-<li><a href="#_share_v0_10_0_2019_11_05">share v0.10.0 (2019-11-05)</a>
+<li><a href="#_share_v0_10_1_2019_12_05">share v0.10.1 (2019-12-05)</a>
<ul class="sectlevel2">
-<li><a href="#_new_features_6">New Features</a></li>
-<li><a href="#_breaking_changes_6">Breaking Changes</a></li>
-<li><a href="#_enhancements_7">Enhancements</a></li>
<li><a href="#_bug_fixes_8">Bug Fixes</a></li>
+<li><a href="#_enhancements_7">Enhancements</a></li>
</ul>
</li>
-<li><a href="#_share_v0_9_0_2019_10_08">share v0.9.0 (2019-10-08)</a>
+<li><a href="#_share_v0_10_0_2019_11_05">share v0.10.0 (2019-11-05)</a>
<ul class="sectlevel2">
<li><a href="#_new_features_7">New Features</a></li>
<li><a href="#_breaking_changes_7">Breaking Changes</a></li>
-<li><a href="#_bug_fixes_9">Bug Fixes</a></li>
<li><a href="#_enhancements_8">Enhancements</a></li>
+<li><a href="#_bug_fixes_9">Bug Fixes</a></li>
</ul>
</li>
-<li><a href="#_share_v0_8_2_2019_09_05">share v0.8.2 (2019-09-05)</a>
+<li><a href="#_share_v0_9_0_2019_10_08">share v0.9.0 (2019-10-08)</a>
<ul class="sectlevel2">
+<li><a href="#_new_features_8">New Features</a></li>
+<li><a href="#_breaking_changes_8">Breaking Changes</a></li>
+<li><a href="#_bug_fixes_10">Bug Fixes</a></li>
<li><a href="#_enhancements_9">Enhancements</a></li>
</ul>
</li>
-<li><a href="#_share_v0_8_1_2019_08_05">share v0.8.1 (2019-08-05)</a>
+<li><a href="#_share_v0_8_2_2019_09_05">share v0.8.2 (2019-09-05)</a>
<ul class="sectlevel2">
<li><a href="#_enhancements_10">Enhancements</a></li>
</ul>
</li>
-<li><a href="#_share_v0_8_0_2019_07_09">share v0.8.0 (2019-07-09)</a>
+<li><a href="#_share_v0_8_1_2019_08_05">share v0.8.1 (2019-08-05)</a>
<ul class="sectlevel2">
-<li><a href="#_breaking_changes_8">Breaking changes</a></li>
-<li><a href="#_new_features_8">New Features</a></li>
<li><a href="#_enhancements_11">Enhancements</a></li>
</ul>
</li>
-<li><a href="#_share_v0_7_0_2019_06_14">share v0.7.0 (2019-06-14)</a>
+<li><a href="#_share_v0_8_0_2019_07_09">share v0.8.0 (2019-07-09)</a>
<ul class="sectlevel2">
-<li><a href="#_breaking_changes_9">Breaking Changes</a></li>
+<li><a href="#_breaking_changes_9">Breaking changes</a></li>
<li><a href="#_new_features_9">New Features</a></li>
<li><a href="#_enhancements_12">Enhancements</a></li>
-<li><a href="#_bug_fixes_10">Bug Fixes</a></li>
</ul>
</li>
-<li><a href="#_share_v0_6_1_2019_05_11">share v0.6.1 (2019-05-11)</a></li>
-<li><a href="#_share_v0_6_0_2019_05_07">share v0.6.0 (2019-05-07)</a>
+<li><a href="#_share_v0_7_0_2019_06_14">share v0.7.0 (2019-06-14)</a>
<ul class="sectlevel2">
<li><a href="#_breaking_changes_10">Breaking Changes</a></li>
<li><a href="#_new_features_10">New Features</a></li>
+<li><a href="#_enhancements_13">Enhancements</a></li>
<li><a href="#_bug_fixes_11">Bug Fixes</a></li>
-<li><a href="#_documentation">Documentation</a></li>
</ul>
</li>
-<li><a href="#_share_v0_5_0_2019_04_02">share v0.5.0 (2019-04-02)</a>
+<li><a href="#_share_v0_6_1_2019_05_11">share v0.6.1 (2019-05-11)</a></li>
+<li><a href="#_share_v0_6_0_2019_05_07">share v0.6.0 (2019-05-07)</a>
<ul class="sectlevel2">
+<li><a href="#_breaking_changes_11">Breaking Changes</a></li>
<li><a href="#_new_features_11">New Features</a></li>
-<li><a href="#_enhancements_13">Enhancements</a></li>
+<li><a href="#_bug_fixes_12">Bug Fixes</a></li>
+<li><a href="#_documentation">Documentation</a></li>
</ul>
</li>
-<li><a href="#_share_v0_4_0_2019_03_01">share v0.4.0 (2019-03-01)</a>
+<li><a href="#_share_v0_5_0_2019_04_02">share v0.5.0 (2019-04-02)</a>
<ul class="sectlevel2">
<li><a href="#_new_features_12">New Features</a></li>
<li><a href="#_enhancements_14">Enhancements</a></li>
+</ul>
+</li>
+<li><a href="#_share_v0_4_0_2019_03_01">share v0.4.0 (2019-03-01)</a>
+<ul class="sectlevel2">
+<li><a href="#_new_features_13">New Features</a></li>
+<li><a href="#_enhancements_15">Enhancements</a></li>
<li><a href="#_fixes">Fixes</a></li>
</ul>
</li>
<li><a href="#_share_v0_3_0_2019_02_01">share v0.3.0 (2019-02-01)</a>
<ul class="sectlevel2">
<li><a href="#_features_changes">Features Changes</a></li>
-<li><a href="#_enhancements_15">Enhancements</a></li>
+<li><a href="#_enhancements_16">Enhancements</a></li>
<li><a href="#_fixes_2">Fixes</a></li>
</ul>
</li>
<li><a href="#_share_v0_2_0_2019_01_02">share v0.2.0 (2019-01-02)</a>
<ul class="sectlevel2">
-<li><a href="#_new_features_13">New Features</a></li>
-<li><a href="#_enhancements_16">Enhancements</a></li>
+<li><a href="#_new_features_14">New Features</a></li>
+<li><a href="#_enhancements_17">Enhancements</a></li>
</ul>
</li>
<li><a href="#_share_v0_1_0_2018_11_29">share v0.1.0 (2018-11-29)</a></li>
@@ -373,13 +381,244 @@ dd {
</div>
</div>
<div class="sect1">
-<h2 id="_share_v0_15_0_2020_05_04">share v0.15.0 (2020-05-04)</h2>
+<h2 id="_share_v0_16_0_2020_06_05">share v0.16.0 (2020-06-05)</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_breaking_changes">Breaking changes</h3>
<div class="ulist">
<ul>
<li>
+<p>dns: refactoring loading hosts and master files</p>
+</li>
+</ul>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>Instead of as methods in Server, we detach the LoadHostDir and
+LostMasterDir into functions that return list of filename and their
+content.</pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>dns: disable serving DoH and DoT if port is not set (0)</p>
+</li>
+</ul>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>Previously, if HTTPPort or TLSPort is not set (0) we set it to default
+value and keep serving the DNS over HTTP and TLS. Sometimes, user may
+want to serve DNS over UDP only.</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>This changes disable serving DNS over HTTP (DoH) and TLS (DoT) if port
+is not set, or 0.</pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>email: rename ParseAddress function to ParseMailboxes</p>
+</li>
+<li>
+<p>http: add parameter &#34;insecure&#34; when creating new client</p>
+</li>
+<li>
+<p>ini: fix inconsistencies between empty string and boolean true</p>
+</li>
+</ul>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>In Git specification, an empty variable is equal to boolean true.
+This cause inconsistency between empty string and boolean true.</pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>memfs: simplify the API, add directory parameter to New</p>
+</li>
+</ul>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>This changes add parameter directory to be mounted in New(), so user
+did not need to call Mount manually</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>This cause the Mount method and its sibling, Unmount and IsMounted
+become unneeded, so we remove them.</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_bug_fixes">Bug fixes</h3>
+<div class="ulist">
+<ul>
+<li>
+<p>api/telegram/bot: fix request parameter on GetMyCommands</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_new_features">New features</h3>
+<div class="ulist">
+<ul>
+<li>
+<p>bytes: add function MergeSpaces</p>
+</li>
+</ul>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>The function MergeSpaces will convert sequences of white space into
+single space ' '.</pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>email: add methods to unmarshal/marshal Mailbox from/to JSON</p>
+</li>
+<li>
+<p>email: add function to parse single mailbox</p>
+</li>
+<li>
+<p>email: add function to create multipart text and HTML message</p>
+</li>
+<li>
+<p>http: support CORS with white list of origin and headers</p>
+</li>
+<li>
+<p>ini: add method UnsetAll to remove all variables in section and/or
+ subsection that match with the key</p>
+</li>
+<li>
+<p>ini: add method to Unmarshal ini values to struct</p>
+</li>
+<li>
+<p>os/exec: new package to simplify the standard &#34;os/exec&#34;</p>
+</li>
+</ul>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>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.</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>Another extension is Run() function that accept the string command
+to be executed and their standard output and error.</pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>sql: add method to migrate database schema</p>
+</li>
+</ul>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>The Migrate method migrate the database using list of SQL files inside
+a directory.
+Each SQL file in directory will be executed in alphabetical order based on
+the last state.</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>The state of migration will be saved in table "_migration" with the SQL
+file name that has been executed and the timestamp.</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_enhancements">Enhancements</h3>
+<div class="ulist">
+<ul>
+<li>
+<p>api/telegram/bot: delete webhook upon setting new webhook</p>
+</li>
+<li>
+<p>dns: do not load hidden hosts and master file</p>
+</li>
+</ul>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>Previously, the LoadHostDir and LoadMasterDir load all files inside
+the directory without checking if its hidden (starting with dot) or not.</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>This changes make the hidden file not loaded so one can disable it
+temporarily by prefixing it with dot.</pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>ini: make the add method append the variable after existing same key</p>
+</li>
+<li>
+<p>memfs: make the Node Readdir works when calling from generated Go code</p>
+</li>
+</ul>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>Previously, the Go generated code from call to GoGenerate() set only
+mapping of path to node. Calling Readdir() using http.File using</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>root, err := mfs.Open("/")
+fis, err := root.Readdir(0)</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>will return nil on fis.</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>This changes add all child nodes to generated node.</pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>websocket: allow &#34;https&#34; scheme on Client&#39;s Endpoint</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_share_v0_15_0_2020_05_04">share v0.15.0 (2020-05-04)</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_breaking_changes_2">Breaking changes</h3>
+<div class="ulist">
+<ul>
+<li>
<p>big: check for zero length slice of byte or string on toRat</p>
</li>
<li>
@@ -389,7 +628,7 @@ dd {
</div>
</div>
<div class="sect2">
-<h3 id="_new_features">New features</h3>
+<h3 id="_new_features_2">New features</h3>
<div class="ulist">
<ul>
<li>
@@ -423,7 +662,7 @@ to iterate each node in the tree from top to bottom.</pre>
</div>
</div>
<div class="sect2">
-<h3 id="_enhancements">Enhancements</h3>
+<h3 id="_enhancements_2">Enhancements</h3>
<div class="ulist">
<ul>
<li>
@@ -445,7 +684,7 @@ to iterate each node in the tree from top to bottom.</pre>
</div>
</div>
<div class="sect2">
-<h3 id="_bug_fixes">Bug fixes</h3>
+<h3 id="_bug_fixes_2">Bug fixes</h3>
<div class="ulist">
<ul>
<li>
@@ -460,7 +699,7 @@ to iterate each node in the tree from top to bottom.</pre>
<h2 id="_share_v0_14_0_2020_04_03">share v0.14.0 (2020-04-03)</h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_breaking_changes_2">Breaking changes</h3>
+<h3 id="_breaking_changes_3">Breaking changes</h3>
<div class="ulist">
<ul>
<li>
@@ -485,7 +724,7 @@ will be handled automatically based on value on field Method.</pre>
</div>
</div>
<div class="sect2">
-<h3 id="_new_features_2">New features</h3>
+<h3 id="_new_features_3">New features</h3>
<div class="ulist">
<ul>
<li>
@@ -537,7 +776,7 @@ single space ' '.</pre>
</div>
</div>
<div class="sect2">
-<h3 id="_enhancements_2">Enhancements</h3>
+<h3 id="_enhancements_3">Enhancements</h3>
<div class="ulist">
<ul>
<li>
@@ -579,7 +818,7 @@ word.</pre>
</div>
</div>
<div class="sect2">
-<h3 id="_bug_fixes_2">Bug fixes</h3>
+<h3 id="_bug_fixes_3">Bug fixes</h3>
<div class="ulist">
<ul>
<li>
@@ -594,13 +833,13 @@ word.</pre>
<h2 id="_share_v0_13_0_2020_03_11">share v0.13.0 (2020-03-11)</h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_breaking_changes_3">Breaking changes</h3>
+<h3 id="_breaking_changes_4">Breaking changes</h3>
<div class="paragraph">
<p>Set the minimum Go version to 1.13.</p>
</div>
</div>
<div class="sect2">
-<h3 id="_new_features_3">New features</h3>
+<h3 id="_new_features_4">New features</h3>
<div class="ulist">
<ul>
<li>
@@ -613,7 +852,7 @@ word.</pre>
</div>
</div>
<div class="sect2">
-<h3 id="_enhancements_3">Enhancements</h3>
+<h3 id="_enhancements_4">Enhancements</h3>
<div class="ulist">
<ul>
<li>
@@ -635,7 +874,7 @@ word.</pre>
</div>
</div>
<div class="sect2">
-<h3 id="_bug_fixes_3">Bug Fixes</h3>
+<h3 id="_bug_fixes_4">Bug Fixes</h3>
<div class="ulist">
<ul>
<li>
@@ -653,7 +892,7 @@ word.</pre>
<h2 id="_share_v0_12_0_2020_02_13">share v0.12.0 (2020-02-13)</h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_breaking_changes_4">Breaking changes</h3>
+<h3 id="_breaking_changes_5">Breaking changes</h3>
<div class="ulist">
<ul>
<li>
@@ -672,7 +911,7 @@ word.</pre>
</div>
</div>
<div class="sect2">
-<h3 id="_new_features_4">New features</h3>
+<h3 id="_new_features_5">New features</h3>
<div class="ulist">
<ul>
<li>
@@ -688,7 +927,7 @@ word.</pre>
</div>
</div>
<div class="sect2">
-<h3 id="_enhancements_4">Enhancements</h3>
+<h3 id="_enhancements_5">Enhancements</h3>
<div class="ulist">
<ul>
<li>
@@ -698,7 +937,7 @@ word.</pre>
</div>
</div>
<div class="sect2">
-<h3 id="_bug_fixes_4">Bug fixes</h3>
+<h3 id="_bug_fixes_5">Bug fixes</h3>
<div class="ulist">
<ul>
<li>
@@ -713,7 +952,7 @@ word.</pre>
<h2 id="_share_v0_11_0_2019_12_26">share v0.11.0 (2019-12-26)</h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_breaking_changes_5">Breaking changes</h3>
+<h3 id="_breaking_changes_6">Breaking changes</h3>
<div class="ulist">
<ul>
<li>
@@ -723,7 +962,7 @@ word.</pre>
</div>
</div>
<div class="sect2">
-<h3 id="_new_features_5">New features</h3>
+<h3 id="_new_features_6">New features</h3>
<div class="ulist">
<ul>
<li>
@@ -742,7 +981,7 @@ word.</pre>
</div>
</div>
<div class="sect2">
-<h3 id="_enhancements_5">Enhancements</h3>
+<h3 id="_enhancements_6">Enhancements</h3>
<div class="ulist">
<ul>
<li>
@@ -758,7 +997,7 @@ word.</pre>
</div>
</div>
<div class="sect2">
-<h3 id="_bug_fixes_5">Bug fixes</h3>
+<h3 id="_bug_fixes_6">Bug fixes</h3>
<div class="ulist">
<ul>
<li>
@@ -773,7 +1012,7 @@ word.</pre>
<h2 id="_share_v0_10_2_2019_12_07">share v0.10.2 (2019-12-07)</h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_bug_fixes_6">Bug Fixes</h3>
+<h3 id="_bug_fixes_7">Bug Fixes</h3>
<div class="ulist">
<ul>
<li>
@@ -791,7 +1030,7 @@ word.</pre>
<h2 id="_share_v0_10_1_2019_12_05">share v0.10.1 (2019-12-05)</h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_bug_fixes_7">Bug Fixes</h3>
+<h3 id="_bug_fixes_8">Bug Fixes</h3>
<div class="ulist">
<ul>
<li>
@@ -840,7 +1079,7 @@ word.</pre>
</div>
</div>
<div class="sect2">
-<h3 id="_enhancements_6">Enhancements</h3>
+<h3 id="_enhancements_7">Enhancements</h3>
<div class="ulist">
<ul>
<li>
@@ -885,7 +1124,7 @@ word.</pre>
<h2 id="_share_v0_10_0_2019_11_05">share v0.10.0 (2019-11-05)</h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_new_features_6">New Features</h3>
+<h3 id="_new_features_7">New Features</h3>
<div class="ulist">
<ul>
<li>
@@ -901,7 +1140,7 @@ word.</pre>
</div>
</div>
<div class="sect2">
-<h3 id="_breaking_changes_6">Breaking Changes</h3>
+<h3 id="_breaking_changes_7">Breaking Changes</h3>
<div class="ulist">
<ul>
<li>
@@ -914,7 +1153,7 @@ word.</pre>
</div>
</div>
<div class="sect2">
-<h3 id="_enhancements_7">Enhancements</h3>
+<h3 id="_enhancements_8">Enhancements</h3>
<div class="ulist">
<ul>
<li>
@@ -936,7 +1175,7 @@ word.</pre>
</div>
</div>
<div class="sect2">
-<h3 id="_bug_fixes_8">Bug Fixes</h3>
+<h3 id="_bug_fixes_9">Bug Fixes</h3>
<div class="ulist">
<ul>
<li>
@@ -966,7 +1205,7 @@ word.</pre>
<h2 id="_share_v0_9_0_2019_10_08">share v0.9.0 (2019-10-08)</h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_new_features_7">New Features</h3>
+<h3 id="_new_features_8">New Features</h3>
<div class="ulist">
<ul>
<li>
@@ -1009,7 +1248,7 @@ http.Request.Form using Get method.</p>
</div>
</div>
<div class="sect2">
-<h3 id="_breaking_changes_7">Breaking Changes</h3>
+<h3 id="_breaking_changes_8">Breaking Changes</h3>
<div class="ulist">
<ul>
<li>
@@ -1036,7 +1275,7 @@ to be an empty string, so &#34;var&#34; value is equal to &#34;&#34;.</p>
</div>
</div>
<div class="sect2">
-<h3 id="_bug_fixes_9">Bug Fixes</h3>
+<h3 id="_bug_fixes_10">Bug Fixes</h3>
<div class="ulist">
<ul>
<li>
@@ -1053,7 +1292,7 @@ no DNS queries forwarded to parent server.</p>
</div>
</div>
<div class="sect2">
-<h3 id="_enhancements_8">Enhancements</h3>
+<h3 id="_enhancements_9">Enhancements</h3>
<div class="ulist">
<ul>
<li>
@@ -1078,7 +1317,7 @@ to Search the content.</p>
<h2 id="_share_v0_8_2_2019_09_05">share v0.8.2 (2019-09-05)</h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_enhancements_9">Enhancements</h3>
+<h3 id="_enhancements_10">Enhancements</h3>
<div class="ulist">
<ul>
<li>
@@ -1128,7 +1367,7 @@ in directory.</p>
<h2 id="_share_v0_8_1_2019_08_05">share v0.8.1 (2019-08-05)</h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_enhancements_10">Enhancements</h3>
+<h3 id="_enhancements_11">Enhancements</h3>
<div class="ulist">
<ul>
<li>
@@ -1166,7 +1405,7 @@ file, we want that file to be excluded from .go static source.</p>
<h2 id="_share_v0_8_0_2019_07_09">share v0.8.0 (2019-07-09)</h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_breaking_changes_8">Breaking changes</h3>
+<h3 id="_breaking_changes_9">Breaking changes</h3>
<div class="ulist">
<ul>
<li>
@@ -1177,7 +1416,7 @@ file, we want that file to be excluded from .go static source.</p>
</div>
</div>
<div class="sect2">
-<h3 id="_new_features_8">New Features</h3>
+<h3 id="_new_features_9">New Features</h3>
<div class="ulist">
<ul>
<li>
@@ -1187,7 +1426,7 @@ file, we want that file to be excluded from .go static source.</p>
</div>
</div>
<div class="sect2">
-<h3 id="_enhancements_11">Enhancements</h3>
+<h3 id="_enhancements_12">Enhancements</h3>
<div class="ulist">
<ul>
<li>
@@ -1212,7 +1451,7 @@ file, we want that file to be excluded from .go static source.</p>
simple API.</p>
</div>
<div class="sect2">
-<h3 id="_breaking_changes_9">Breaking Changes</h3>
+<h3 id="_breaking_changes_10">Breaking Changes</h3>
<div class="ulist">
<ul>
<li>
@@ -1225,7 +1464,7 @@ simple API.</p>
</div>
</div>
<div class="sect2">
-<h3 id="_new_features_9">New Features</h3>
+<h3 id="_new_features_10">New Features</h3>
<div class="ulist">
<ul>
<li>
@@ -1238,7 +1477,7 @@ simple API.</p>
</div>
</div>
<div class="sect2">
-<h3 id="_enhancements_12">Enhancements</h3>
+<h3 id="_enhancements_13">Enhancements</h3>
<div class="ulist">
<ul>
<li>
@@ -1296,7 +1535,7 @@ simple API.</p>
</div>
</div>
<div class="sect2">
-<h3 id="_bug_fixes_10">Bug Fixes</h3>
+<h3 id="_bug_fixes_11">Bug Fixes</h3>
<div class="ulist">
<ul>
<li>
@@ -1350,7 +1589,7 @@ Most notable changes are adding caches and query forwarding (recursion), and
removing the server handler.</p>
</div>
<div class="sect2">
-<h3 id="_breaking_changes_10">Breaking Changes</h3>
+<h3 id="_breaking_changes_11">Breaking Changes</h3>
<div class="ulist">
<ul>
<li>
@@ -1424,7 +1663,7 @@ removing the server handler.</p>
</div>
</div>
<div class="sect2">
-<h3 id="_new_features_10">New Features</h3>
+<h3 id="_new_features_11">New Features</h3>
<div class="ulist">
<ul>
<li>
@@ -1494,7 +1733,7 @@ removing the server handler.</p>
</div>
</div>
<div class="sect2">
-<h3 id="_bug_fixes_11">Bug Fixes</h3>
+<h3 id="_bug_fixes_12">Bug Fixes</h3>
<div class="ulist">
<ul>
<li>
@@ -1560,7 +1799,7 @@ server and client API to make it easy and extensible. The websocket is now
100% pass the autobahn testsuite (minus compression feature).</p>
</div>
<div class="sect2">
-<h3 id="_new_features_11">New Features</h3>
+<h3 id="_new_features_12">New Features</h3>
<div class="ulist">
<ul>
<li>
@@ -1579,7 +1818,7 @@ server and client API to make it easy and extensible. The websocket is now
</div>
</div>
<div class="sect2">
-<h3 id="_enhancements_13">Enhancements</h3>
+<h3 id="_enhancements_14">Enhancements</h3>
<div class="ulist">
<ul>
<li>
@@ -1627,7 +1866,7 @@ server and client API to make it easy and extensible. The websocket is now
<h2 id="_share_v0_4_0_2019_03_01">share v0.4.0 (2019-03-01)</h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_new_features_12">New Features</h3>
+<h3 id="_new_features_13">New Features</h3>
<div class="ulist">
<ul>
<li>
@@ -1644,7 +1883,7 @@ server and client API to make it easy and extensible. The websocket is now
</div>
</div>
<div class="sect2">
-<h3 id="_enhancements_14">Enhancements</h3>
+<h3 id="_enhancements_15">Enhancements</h3>
<div class="ulist">
<ul>
<li>
@@ -1833,7 +2072,7 @@ server and client API to make it easy and extensible. The websocket is now
</div>
</div>
<div class="sect2">
-<h3 id="_enhancements_15">Enhancements</h3>
+<h3 id="_enhancements_16">Enhancements</h3>
<div class="ulist">
<ul>
<li>
@@ -1873,7 +2112,7 @@ server and client API to make it easy and extensible. The websocket is now
<h2 id="_share_v0_2_0_2019_01_02">share v0.2.0 (2019-01-02)</h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_new_features_13">New Features</h3>
+<h3 id="_new_features_14">New Features</h3>
<div class="ulist">
<ul>
<li>
@@ -1887,7 +2126,7 @@ system and simplified routing handler.</p>
</div>
</div>
<div class="sect2">
-<h3 id="_enhancements_16">Enhancements</h3>
+<h3 id="_enhancements_17">Enhancements</h3>
<div class="paragraph">
<p>Fix warnings from linters.</p>
</div>
diff --git a/_doc/index.html b/_doc/index.html
index 5d695960..d1e926a2 100644
--- a/_doc/index.html
+++ b/_doc/index.html
@@ -451,6 +451,10 @@ written in Go.</p>
integer, float, slice of integer, and slice of floats.</p>
</li>
<li>
+<p><a href="https://pkg.go.dev/github.com/shuLhan/share/lib/os/exec"><strong>os/exec</strong></a>: Package exec wrap the standar package
+&#34;os/exec&#34; to simplify calling Run with stdout and stderr.</p>
+</li>
+<li>
<p><a href="https://pkg.go.dev/github.com/shuLhan/share/lib/parser"><strong>parser</strong></a>: Package parser provide a common text
parser, using delimiters.</p>
</li>
@@ -639,7 +643,7 @@ First, install <code>ciigo</code> command line interface,</p>
</div>
<div class="listingblock">
<div class="content">
-<pre>$ ciigo serve doc/</pre>
+<pre>$ ciigo serve _doc/</pre>
</div>
</div>
<div class="paragraph">
@@ -652,7 +656,7 @@ files.</p>
</div>
<div class="listingblock">
<div class="content">
-<pre>$ ciigo convert doc/</pre>
+<pre>$ ciigo convert _doc/</pre>
</div>
</div>
</div>
diff --git a/go.mod b/go.mod
index ff321666..0b16faf6 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,7 @@ module github.com/shuLhan/share
go 1.13
require (
- golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59
- golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e
- golang.org/x/sys v0.0.0-20200331124033-c3d80250170d
+ golang.org/x/crypto v0.0.0-20200602180216-279210d13fed
+ golang.org/x/net v0.0.0-20200602114024-627f9648deb9
+ golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980
)
diff --git a/go.sum b/go.sum
index ea10d5d9..edcae572 100644
--- a/go.sum
+++ b/go.sum
@@ -1,12 +1,12 @@
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59 h1:3zb4D3T4G8jdExgVU/95+vQXfpEPiMdCaZgmGVxjNHM=
-golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20200602180216-279210d13fed h1:g4KENRiCMEx58Q7/ecwfT0N2o8z35Fnbsjig/Alf2T4=
+golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k=
-golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200602114024-627f9648deb9 h1:pNX+40auqi2JqRfOP1akLGtYcn15TUbkhwuCO3foqqM=
+golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200331124033-c3d80250170d h1:nc5K6ox/4lTFbMVSL9WRR81ixkcwXThoiF6yf+R9scA=
-golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 h1:OjiUf46hAmXblsZdnoSXsEUSKU8r1UEzcL5RVZ4gO9Y=
+golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
diff --git a/share.go b/share.go
index 28bea796..51563838 100644
--- a/share.go
+++ b/share.go
@@ -8,9 +8,7 @@
//
package share
-//
-// Version of this module.
-//
const (
- Version = "0.15.0"
+ // Version of this module.
+ Version = "0.16.0"
)