mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-10-31 13:50:01 +00:00 
			
		
		
		
	godep restore pushd $GOPATH/src/github.com/appc/spec git co master popd go get go4.org/errorutil rm -rf Godeps godep save ./... git add vendor git add -f $(git ls-files --other vendor/) git co -- Godeps/LICENSES Godeps/.license_file_state Godeps/OWNERS
		
			
				
	
	
		
			26 lines
		
	
	
		
			712 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			712 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Package negroni is an idiomatic approach to web middleware in Go. It is tiny, non-intrusive, and encourages use of net/http Handlers.
 | |
| //
 | |
| // If you like the idea of Martini, but you think it contains too much magic, then Negroni is a great fit.
 | |
| //
 | |
| // For a full guide visit http://github.com/codegangsta/negroni
 | |
| //
 | |
| //  package main
 | |
| //
 | |
| //  import (
 | |
| //    "github.com/codegangsta/negroni"
 | |
| //    "net/http"
 | |
| //    "fmt"
 | |
| //  )
 | |
| //
 | |
| //  func main() {
 | |
| //    mux := http.NewServeMux()
 | |
| //    mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
 | |
| //      fmt.Fprintf(w, "Welcome to the home page!")
 | |
| //    })
 | |
| //
 | |
| //    n := negroni.Classic()
 | |
| //    n.UseHandler(mux)
 | |
| //    n.Run(":3000")
 | |
| //  }
 | |
| package negroni
 |