Skip to content

Commit 608ec3c

Browse files
authored
chore: add env to api info (#305)
1 parent caf6361 commit 608ec3c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

server/server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ type APIDefinition interface {
4949
type APIInfo struct {
5050
Name string `json:"name"`
5151
Version string `json:"version"`
52+
Env string `json:"env"`
5253
}
5354

5455
// HealthChecker is used to run a custom health check

server/server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func (a *testAPICustomHealth) Healthy(w http.ResponseWriter, r *http.Request) er
117117
return router.InternalServerError("healthcheck failed")
118118
}
119119
func (a *testAPICustomHealth) Info() APIInfo {
120-
return APIInfo{"testing", ""}
120+
return APIInfo{"testing", "", "testing"}
121121
}
122122

123123
func TestServerCustomHealth(t *testing.T) {

0 commit comments

Comments
 (0)