An OpenShift Source-to-Image builder dedicated to Go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
306 B

package main
import (
"fmt"
"net/http"
)
const (
port = ":8080"
)
func HelloWorld(w http.ResponseWriter, r *http.Request) {
fmt.Println(w, "Hello, world !")
}
func main() {
fmt.Printf("Started server on port %v.\n", port)
http.HandleFunc("/", HelloWorld)
http.ListenAndServe(port, nil)
}