diff --git a/src/gemini.go b/src/gemini.go index efbd110..a73c8ef 100644 --- a/src/gemini.go +++ b/src/gemini.go @@ -47,6 +47,8 @@ const ( STATUS_CERTIFICATE_NOT_ACCEPTED = 63 STATUS_FUTURE_CERTIFICATE_REJECTED = 64 STATUS_EXPIRED_CERTIFICATE_REJECTED = 65 + + SECRETSHOP_VERSION = "1.0.0" ) type Response struct { @@ -129,7 +131,7 @@ func generateCGI(selector *url.URL, c *conn) Response { fmt.Sprintf("SERVER_NAME=%v", selector.Hostname()), fmt.Sprintf("SERVER_PORT=%v", c.server.Port), "SERVER_PROTOCOL=GEMINI", - "SERVER_SOFTWARE=secretshop/0.1.0", + "SERVER_SOFTWARE=secretshop/" + SECRETSHOP_VERSION, } cmdout, err := cmd.Output() if ctx.Err() == context.DeadlineExceeded { diff --git a/src/main.go b/src/main.go index 28d1e66..9f9d534 100644 --- a/src/main.go +++ b/src/main.go @@ -41,14 +41,12 @@ func main() { wg := new(sync.WaitGroup) wg.Add(1 + len(hole_list)) - log.Printf("Starting gemini capsule") go func(c interface{}) { log.Fatal(ListenAndServeTLS(port, c.([]GeminiConfig))) wg.Done() }(capsule_list) - for i, h := range hole_list { - log.Printf("Starting gopherhole %v %v", i, h.Hostname) + for _, h := range hole_list { go func(h interface{}) { hole := h.(GopherConfig) gopher.Handle("/", index(gopher.Dir(hole.RootDir))) @@ -58,7 +56,7 @@ func main() { }(h) } - log.Println("Done bringing up capsules and gopherholes") + log.Println("Loaded SecretShop " + SECRETSHOP_VERSION) log.Println("Ho ho! You found me!") wg.Wait() }