aboutsummaryrefslogtreecommitdiff
path: root/server.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-04-05 20:37:03 +0800
committerRunxi Yu <me@runxiyu.org>2025-04-05 20:37:03 +0800
commit2d0ea5ba085f9caa84a7e7b1fd55f653834009aa (patch)
tree46278813d2e2f7dd080c9289321c1021fa619e80 /server.go
parentircSend* shall no longer be global variables (diff)
downloadforge-2d0ea5ba085f9caa84a7e7b1fd55f653834009aa.tar.gz
forge-2d0ea5ba085f9caa84a7e7b1fd55f653834009aa.tar.zst
forge-2d0ea5ba085f9caa84a7e7b1fd55f653834009aa.zip
sshPubkey* shall no longer be global variables
Diffstat (limited to 'server.go')
-rw-r--r--server.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/server.go b/server.go
index 30b39f1..71e1232 100644
--- a/server.go
+++ b/server.go
@@ -4,6 +4,7 @@ import (
"net/http"
"github.com/jackc/pgx/v5/pgxpool"
+ goSSH "golang.org/x/crypto/ssh"
)
type server struct {
@@ -19,4 +20,11 @@ type server struct {
ircSendBuffered chan string
ircSendDirectChan chan errorBack[string]
+
+ // globalData is passed as "global" when rendering HTML templates.
+ globalData map[string]any
+
+ serverPubkeyString string
+ serverPubkeyFP string
+ serverPubkey goSSH.PublicKey
}