We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6fc524 commit a7ff7d0Copy full SHA for a7ff7d0
.gitignore
go.mod
@@ -0,0 +1,3 @@
1
+module github.com/setlog/debug-k8s
2
+
3
+go 1.13
main.go
@@ -0,0 +1,20 @@
+package main
+import (
4
+ "fmt"
5
+ "log"
6
+ "net/http"
7
+ "os"
8
+)
9
10
+func hello(w http.ResponseWriter, req *http.Request) {
11
+ fmt.Fprintf(w, "Hostname: "+os.Getenv("HOSTNAME")+"\n")
12
+}
13
14
+func main() {
15
+ http.HandleFunc("/hello", hello)
16
+ log.Println("I am going to start...")
17
+ if err := http.ListenAndServe(":http", nil); err != nil {
18
+ panic(err)
19
+ }
20
0 commit comments