aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-13 00:46:11 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-13 00:46:11 +0800
commit127e2c39acd1ce19a90aa91640eb2b594c4b4144 (patch)
tree1e0f8956043f7c0091a4f6f15749aa1dd3e040cb
parent*.go: Mass rename files for clarity (diff)
downloadforge-127e2c39acd1ce19a90aa91640eb2b594c4b4144.tar.gz
forge-127e2c39acd1ce19a90aa91640eb2b594c4b4144.tar.zst
forge-127e2c39acd1ce19a90aa91640eb2b594c4b4144.zip
*.go: Reformat
-rw-r--r--http_global.go4
-rw-r--r--ssh_utils.go8
2 files changed, 7 insertions, 5 deletions
diff --git a/http_global.go b/http_global.go
index 3e06171..e7ee580 100644
--- a/http_global.go
+++ b/http_global.go
@@ -1,6 +1,6 @@
package main
-var global_data = map[string]any {
- "server_public_key_string": &server_public_key_string,
+var global_data = map[string]any{
+ "server_public_key_string": &server_public_key_string,
"server_public_key_fingerprint": &server_public_key_fingerprint,
}
diff --git a/ssh_utils.go b/ssh_utils.go
index a08e20c..fb23db6 100644
--- a/ssh_utils.go
+++ b/ssh_utils.go
@@ -11,9 +11,11 @@ import (
go_ssh "golang.org/x/crypto/ssh"
)
-var server_public_key_string string
-var server_public_key_fingerprint string
-var server_public_key go_ssh.PublicKey
+var (
+ server_public_key_string string
+ server_public_key_fingerprint string
+ server_public_key go_ssh.PublicKey
+)
func serve_ssh() error {
host_key_bytes, err := os.ReadFile(config.SSH.Key)