Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:adrianSuSE:go-webserver
simple-go-webserver
webserver.go
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File webserver.go of Package simple-go-webserver
package main import ( "fmt" "html" "log" "net/http" ) func main() { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "Hello, %q", html.EscapeString(r.URL.Path)) }) http.HandleFunc("/hi", func(w http.ResponseWriter, r *http.Request){ fmt.Fprintf(w, "Hi") }) log.Fatal(http.ListenAndServe(":8081", nil)) }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor