up
This commit is contained in:
@@ -6,8 +6,10 @@ import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
var Version = "0.0.1"
|
||||
|
||||
func indexHandler(w http.ResponseWriter, r *http.Request) {
|
||||
w.Write([]byte("<h1>Hello World!</h1>"))
|
||||
w.Write([]byte("<h1>Hello World, im ver:"+Version+" !</h1>"))
|
||||
}
|
||||
|
||||
func main() {
|
||||
@@ -16,7 +18,7 @@ func main() {
|
||||
port = "3000"
|
||||
}
|
||||
|
||||
fmt.Print("\nim run in http://127.0.0.1:", port)
|
||||
fmt.Print("\nVersion:", Version, ", Im run in http://127.0.0.1:", port)
|
||||
|
||||
mux := http.NewServeMux()
|
||||
mux.HandleFunc("/", indexHandler)
|
||||
|
Reference in New Issue
Block a user