Добавлен workflow для сборки и релиза

This commit is contained in:
2025-07-27 12:40:09 +06:00
parent 4022255201
commit 90c08975f0
6 changed files with 82 additions and 0 deletions

23
main.go Normal file
View File

@@ -0,0 +1,23 @@
package main
import (
"fmt"
"net/http"
"os"
)
const version = "1.0.0"
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello, World! (Version %s)\n", version)
})
port := os.Getenv("PORT")
if port == "" {
port = "8080"
}
fmt.Printf("Server starting on port %s...\n", port)
http.ListenAndServe(":"+port, nil)
}