aboutsummaryrefslogtreecommitdiff
path: root/example.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-02-02 23:11:46 +0700
committerShulhan <ms@kilabit.info>2026-02-04 04:46:49 +0700
commit4040e757445faee58544bf65bc5fa65458b56f9d (patch)
treef970e8717cfdf60afbb4d19127ef8693cbda83d0 /example.go
parente7e5f54ce3175c6c8ba326c0cc97a13cc9d8fe49 (diff)
downloadgorankusu-dev.tar.xz
cmd/gorankusu: implement socket based activation with systemdHEADmaindev
The internal/cmd/gorankusu now can run using systemd.socket(5).
Diffstat (limited to 'example.go')
-rw-r--r--example.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/example.go b/example.go
index 8a0fcdf..b8e5757 100644
--- a/example.go
+++ b/example.go
@@ -8,6 +8,7 @@ import (
"encoding/json"
"fmt"
"mime/multipart"
+ "net"
"net/http"
"net/url"
"strconv"
@@ -60,10 +61,11 @@ type Example struct {
}
// NewExample create, initialize, and setup an example of Gorankusu.
-func NewExample(listenAddress string, isDev bool) (ex *Example, err error) {
+func NewExample(listener net.Listener, listenAddress string, isDev bool) (ex *Example, err error) {
var logp = `NewExample`
var env = &Environment{
+ Listener: listener,
ListenAddress: listenAddress,
ResultsDir: `testdata/example/`,
ResultsSuffix: `example`,