From 4040e757445faee58544bf65bc5fa65458b56f9d Mon Sep 17 00:00:00 2001 From: Shulhan Date: Mon, 2 Feb 2026 23:11:46 +0700 Subject: cmd/gorankusu: implement socket based activation with systemd The internal/cmd/gorankusu now can run using systemd.socket(5). --- example.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'example.go') 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`, -- cgit v1.3