aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--resources.go3
-rw-r--r--ssh_server.go2
2 files changed, 4 insertions, 1 deletions
diff --git a/resources.go b/resources.go
index 2fe7883..81830a4 100644
--- a/resources.go
+++ b/resources.go
@@ -8,6 +8,7 @@ import (
)
// We embed all source for easy AGPL compliance.
+//
//go:embed .gitignore .gitattributes
//go:embed LICENSE README.md
//go:embed *.go go.mod go.sum
@@ -18,6 +19,7 @@ import (
//go:embed git_hooks_client/*.c
//go:embed vendor/*
var source_fs embed.FS
+
var source_handler = http.StripPrefix(
"/:/source/",
http.FileServer(http.FS(source_fs)),
@@ -27,6 +29,7 @@ var source_handler = http.StripPrefix(
var resources_fs embed.FS
var templates *template.Template
+
func load_templates() (err error) {
templates, err = template.New("templates").Funcs(template.FuncMap{
"first_line": first_line,
diff --git a/ssh_server.go b/ssh_server.go
index 1630bab..81906f5 100644
--- a/ssh_server.go
+++ b/ssh_server.go
@@ -41,7 +41,7 @@ func serve_ssh(listener net.Listener) error {
}
clog.Info("Incoming SSH: " + session.RemoteAddr().String() + " " + client_public_key_string + " " + session.RawCommand())
- fmt.Fprintln(session.Stderr(), "Lindenii Forge "+VERSION+", source at "+strings.TrimSuffix(config.HTTP.Root, "/") + "/:/source/\r")
+ fmt.Fprintln(session.Stderr(), "Lindenii Forge "+VERSION+", source at "+strings.TrimSuffix(config.HTTP.Root, "/")+"/:/source/\r")
cmd := session.Command()