| Age | Commit message (Collapse) | Author |
|
The `-base-path` option set the URL prefix for serving HTTP request.
The `-shutdown-idle` option set the duration when server will stop
accepting new connections and shutting down.
|
|
|
|
The httpdfs program now can be activated using systemd.socket(5).
|
|
|
|
Package goanalysis implement go static analysis using
[Analyzer] that are not included in the default "go vet", but included in
the [passes] directory, including: fieldalignment, nilness,
reflectvaluecompare, shadow, sortslice, unusedwrite, and waitgroup.
This package is not mean to be imported directly by other package
except main, like we have in [cmd/gocheck].
The rest (and previous) of the changes are affect running gocheck on it.
|
|
|
|
|
|
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.
|
|
The emaildecode accept file as input.
If the email header contains content-transfer-encoding with value
quoted-printable or base64, it will decode the message body and print it
to stdout as plain text.
|
|
|
|
By default httpdfs now serve all files under base directory.
|
|
Usage,
ansua <duration> [ "<command>" ]
ansua execute a timer on defined duration and optionally run a command
when timer finished.
When ansua timer is running, one can pause the timer by pressing p+Enter,
and resume it by pressing r+Enter, or stopping it using CTRL+c.
|
|
The NewServer and NewClient now accept non-pointer options, so the
caller unable to modify the options once the server or client has
been created.
|
|
|
|
Instead of annotating the lines that caught by linters, fix it to comply
with the recommendations.
This causes several breaking changes, especially related to naming,
* api/slack: [Message.IconUrl] become [Message.IconURL]
* lib/dns: DefaultSoaMinumumTtl become DefaultSoaMinimumTTL
* lib/email: [Message.SetBodyHtml] become [Message.SetBodyHTML]
* lib/http: [Client.GenerateHttpRequest] become
[Client.GenerateHTTPRequest]
* lib/http: [ClientOptions.ServerUrl] become [ClientOptions.ServerURL]
* lib/http: [EndpointRequest.HttpWriter] become
[EndpointRequest.HTTPWriter]
* lib/http: [EndpointRequest.HttpRequest] become
[EndpointRequest.HTTPRequest]
* lib/http: [ServerOptions.EnableIndexHtml] become
[ServerOptions.EnableIndexHTML]
* lib/http: [SSEConn.HttpRequest] become [SSEConn.HTTPRequest]
* lib/smtp: [ClientOptions.ServerUrl] become [ClientOptions.ServerURL]
* lib/ssh/sftp: [FileAttrs.SetUid] become [FileAttrs.SetUID]
* lib/ssh/sftp: [FileAttrs.Uid] become [FileAttrs.UID]
|
|
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
|
|
There are some reports that I disagree with revive, in example, code
should not declare the type after variables.
In my opinion, on some cases, declaring the type make the code more
readable and explicit.
Since I did not want to add new configuration file, we changes it and
follow revive for now.
|
|
The httpdfs accept single directory to be served under HTTP server,
with the following options,
-address <IP:PORT>
Run the HTTP server on specific IP address and port.
Default to ` + defAddress + `.
-exclude <regex>
Exclude the files matched by regex from being served.
Default to empty, none of files is excluded.
-help
Print this usage.
-include <regex>
Serve only list of files matched with regex.
Default to include CSS, HTML, JavaScript, ICO, JPG, PNG, and
SVG files only.
-version
Print the program version.
|
|
This reduce the client size from 56 to 40 bytes (-16).
|
|
|
|
Mention that some of the commands are example of implementation of the
library.
|
|
Using global debug value for all packages turns out is not a good
idea.
|
|
|
|
The cart, cascaded-random-forest, lnsmote, random-forest, and smote
are part of completing thesis and they never used anymore.
|
|
While at it, expand the usage to describe the synopsis, arguments,
and example of command.
Also, replace any variable assignment from ":=" to explicit variable
with type.
|
|
|
|
|
|
The flag for RFC1123 comes with two options one with string timezone
(-rfc1123) and one with numeric time zone (-rfc1123z).
|
|
|
|
This is the CLI that implements the lib/ini for getting and setting
the key's value from INI file.
|
|
|
|
Since Go 1.16, the ioutil package has been deprecated.
This changes replace any usage that use functions from ioutil package
with their replacement from package os or package io.
|
|
The sendemail command is proof of concept on how to use lib/email and
lib/smtp to write and send email through SMTP.
|
|
Previously, to create new client one must pass three parameters to
NewClient function: localName, remoteURL, and insecure.
If we want to add another parameters in the future, it will cause the
function signature changes.
This changes simplify creating NewClient by passing single struct
with new parameters: AuthUser, AuthPass, and AuthMechanism.
If both AuthUser and AuthPass is not empty, the NewClient will
authenticate the connection, minimize number of step on the caller.
|
|
xtrk accept single file to uncompress and/or archived into a directory
output dir".
If directory output "dir" is not defined, it will be set to current
directoy.
The compression and archive format is detected automatically based on the
following file input extension:
* .bz2: decompress using bzip2.
* .gz: decompress using gzip.
* .tar: unarchive using tar.
* .zip: unarchive using zip.
* .tar.bz2: decompress using bzip2 and unarchive using tar.
* .tar.gz: decompresss using gzip and unarchive using tar.
The input file will be removed on success.
|
|
The Go has their own file mode that works across all operating system.
The file mode is represented by uint64, the command line will convert it
to fs.FileMode and print each possible flag on it including the
permission.
http://127.0.0.1:6060/pkg/io/fs/#FileMode
|
|
Program epoch print the current time (Unix seconds, milliseconds,
nanoseconds, local time, and UTC time) or the time based on the epoch on
first parameter.
Usage,
epoch <unix-seconds|unix-milliseconds|unix-nanoseconds>
Without a parameter, it will print the current time.
With single parameter, it will print the time based on that epoch.
|
|
Previously, the first parameter to New is a function that return
hash.Hash. This signature can be misleading, because md5.New also
can return hash.Hash but not usable in TOTP.
This changes update the New function signature to accept defined
type that can be set to SHA1, SHA256, or SHA512.
|
|
The GenerateN method will return list of password from
(current time - N*timeStep) until the current time.
|
|
The totp is a program to generate Time-based One-time Password from
secret key.
|
|
|
|
|
|
|
|
The valid syntax to suppress linter warnings is "//nolint:<name>" with
no space between comment and "nolint" and between ":". Also, we move the
placement of nolint directive to the top of statements for multiple
nolint in the same scope.
While at it, fix and supress some linter warnings.
|
|
The smtpcli provide five internal command to interact with server:
"starttls", "from", "to", "data", and "quit".
|
|
Most of the warnings caused by update to linter which cause global
variables declared with grouping "( ... )" and that has been suppressed,
are become false-positive again.
|
|
|
|
|
|
|
|
|