mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-07 02:07:58 +00:00
Add vendor folder to git
This commit is contained in:
parent
66cf5eaafb
commit
183585f56f
6916 changed files with 2629581 additions and 1 deletions
22
vendor/github.com/emicklei/go-restful/examples/restful-hello-world.go
generated
vendored
Normal file
22
vendor/github.com/emicklei/go-restful/examples/restful-hello-world.go
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/emicklei/go-restful"
|
||||
"io"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// This example shows the minimal code needed to get a restful.WebService working.
|
||||
//
|
||||
// GET http://localhost:8080/hello
|
||||
|
||||
func main() {
|
||||
ws := new(restful.WebService)
|
||||
ws.Route(ws.GET("/hello").To(hello))
|
||||
restful.Add(ws)
|
||||
http.ListenAndServe(":8080", nil)
|
||||
}
|
||||
|
||||
func hello(req *restful.Request, resp *restful.Response) {
|
||||
io.WriteString(resp, "world")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue