aboutsummaryrefslogtreecommitdiff
path: root/server.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-02-02 16:31:34 +0700
committerShulhan <ms@kilabit.info>2026-02-02 16:40:16 +0700
commit5c30c1f5d0435791c164b89f98891ae27dda4dec (patch)
tree4a0829c8501e255a4fd3269eb0bff236fe4f4b02 /server.go
parentf578b0ba7341f8bc97d13cd165070002596cb106 (diff)
downloadciigo-5c30c1f5d0435791c164b89f98891ae27dda4dec.tar.xz
all: add field Listener to ServeOptions
The field Listener allow passing [net.Listener] instance for accepting HTTP connection. One of the use case is to activate the ciigo serve using systemd.socket(5).
Diffstat (limited to 'server.go')
-rw-r--r--server.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/server.go b/server.go
index 2fe26c9..ccb0dc5 100644
--- a/server.go
+++ b/server.go
@@ -51,6 +51,7 @@ func (ciigo *Ciigo) InitHTTPServer(opts ServeOptions) (err error) {
ciigo.serveOpts = opts
var httpdOpts = libhttp.ServerOptions{
+ Listener: opts.Listener,
Memfs: opts.Mfs,
Address: opts.Address,
EnableIndexHTML: opts.EnableIndexHTML,