31 lines
555 B
Go
31 lines
555 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"go.sour.is/xt/internal/otel"
|
|
)
|
|
|
|
type HTML struct {
|
|
app *appState
|
|
db db
|
|
hostname string
|
|
}
|
|
|
|
func (a *HTML) healthcheck(w http.ResponseWriter, r *http.Request) {
|
|
_, span := otel.Span(r.Context())
|
|
defer span.End()
|
|
|
|
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
|
|
w.Write([]byte("ok"))
|
|
}
|
|
|
|
func (a *HTML) home(w http.ResponseWriter, r *http.Request) {
|
|
_, span := otel.Span(r.Context())
|
|
defer span.End()
|
|
|
|
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
|
|
w.Write([]byte("ok"))
|
|
}
|
|
|