File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change 1
1
package main
2
2
3
3
import (
4
- "fmt"
5
- "github.com/prometheus/client_golang/prometheus/promhttp"
6
- "log"
7
- "net/http"
4
+ "fmt"
5
+ "github.com/prometheus/client_golang/prometheus/promhttp"
6
+ "log"
7
+ "net/http"
8
8
)
9
9
10
10
func main () {
11
- fmt .Println ("Service running" )
11
+ fmt .Println ("Service running" )
12
12
13
- http .Handle ("/metrics" , promhttp .Handler ())
14
- http .HandleFunc ("/" , func (w http.ResponseWriter , req * http.Request ) {
15
- w .WriteHeader (200 )
16
- w .Write ([]byte (`{"status": "OK"}` ))
17
- })
13
+ http .Handle ("/metrics" , promhttp .Handler ())
14
+ http .HandleFunc ("/" , func (w http.ResponseWriter , req * http.Request ) {
15
+ w .WriteHeader (200 )
16
+ w .Write ([]byte (`{"status": "OK"}` ))
17
+ })
18
18
19
- err := http .ListenAndServe (":80" , nil )
20
- if err != nil {
21
- log .Fatalf ("failed to start HTTP server: %s" , err )
22
- }
19
+ err := http .ListenAndServe (":80" , nil )
20
+ if err != nil {
21
+ log .Fatalf ("failed to start HTTP server: %s" , err )
22
+ }
23
23
}
You can’t perform that action at this time.
0 commit comments