This file is indexed.

/usr/share/gocode/src/github.com/xiang90/probing/server.go is in golang-github-xiang90-probing-dev 0.0.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package probing

import (
	"encoding/json"
	"net/http"
	"time"
)

func NewHandler() http.Handler {
	return &httpHealth{}
}

type httpHealth struct {
}

type Health struct {
	OK  bool
	Now time.Time
}

func (h *httpHealth) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	health := Health{OK: true, Now: time.Now()}
	e := json.NewEncoder(w)
	e.Encode(health)
}