mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
21 lines
333 B
Go
21 lines
333 B
Go
package controllers
|
|
|
|
import (
|
|
"encoding/json"
|
|
"net/http"
|
|
)
|
|
|
|
type ServiceInfo struct {
|
|
Version string `json:"version"`
|
|
}
|
|
|
|
func (s *StargateController) GetInfo(w http.ResponseWriter, r *http.Request) {
|
|
info := ServiceInfo{
|
|
Version: s.config.version,
|
|
}
|
|
|
|
if err := json.NewEncoder(w).Encode(info); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|