aboutsummaryrefslogtreecommitdiff
path: root/cmd/httpdfs/main.go
AgeCommit message (Collapse)Author
2026-02-11cmd/httpdfs: add option to set base path and shutdown idle durationShulhan
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.
2026-02-05cmd/httpdfs: fix call to log.FatalShulhan
2026-02-02cmd/httpdfs: implement systemd socket activationShulhan
The httpdfs program now can be activated using systemd.socket(5).
2026-01-03all: use SPDX license header formatShulhan
2024-04-03cmd/httpdfs: set default include options to emptyShulhan
By default httpdfs now serve all files under base directory.
2024-03-09lib/http: refactoring NewServer and NewClientShulhan
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.
2024-03-05all: comply with linter recommendations #1Shulhan
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]
2024-03-02all: move the repository to "git.sr.ht/~shulhan/pakakeh.go"Shulhan
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
2023-12-12cmd/httpdfs: implement [libhttp.Server] with [memfs.MemFS]Shulhan
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.