mirror of
				https://github.com/golang/go.git
				synced 2025-10-31 16:50:58 +00:00 
			
		
		
		
	 e3e09e3d5f
			
		
	
	
		e3e09e3d5f
		
	
	
	
	
		
			
			Fixes #19511 Change-Id: I5585726773b822dba0be0196961132323ebbe084 Reviewed-on: https://go-review.googlesource.com/53071 Reviewed-by: Chris Broadfoot <cbro@golang.org>
		
			
				
	
	
		
			16 lines
		
	
	
	
		
			259 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
	
		
			259 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package main
 | |
| 
 | |
| import (
 | |
| 	"fmt"
 | |
| 	"log"
 | |
| 	"net/http"
 | |
| )
 | |
| 
 | |
| func handler(w http.ResponseWriter, r *http.Request) {
 | |
| 	fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:])
 | |
| }
 | |
| 
 | |
| func main() {
 | |
| 	http.HandleFunc("/", handler)
 | |
| 	log.Fatal(http.ListenAndServe(":8080", nil))
 | |
| }
 |