Skip to content

Commit

Permalink
Replace any with interface to avoid bumping Go version
Browse files Browse the repository at this point in the history
  • Loading branch information
alexliesenfeld committed Oct 17, 2023
1 parent 595b37b commit 4e5dd5b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions check.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
type (
checkerConfig struct {
timeout time.Duration
info map[string]any
info map[string]interface{}
checks map[string]*Check
cacheTTL time.Duration
statusChangeListener func(context.Context, CheckerState)
Expand Down Expand Up @@ -95,7 +95,7 @@ type (
// detailed information about the individual checks.
CheckerResult struct {
// Info contains additional information about this health result.
Info map[string]any `json:"info,omitempty"`
Info map[string]interface{} `json:"info,omitempty"`
// Status is the aggregated system availability status.
Status AvailabilityStatus `json:"status"`
// Details contains health information for all checked components.
Expand Down
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func WithInterceptors(interceptors ...Interceptor) CheckerOption {
// version number, Git SHA, build date, etc. These values will be available in CheckerResult.Info. If you use the
// default HTTP handler of this library (see NewHandler) or convert the CheckerResult to JSON on your own,
// these values will be available in the "info" field.
func WithInfo(values map[string]any) CheckerOption {
func WithInfo(values map[string]interface{}) CheckerOption {
return func(cfg *checkerConfig) {
cfg.info = values
}
Expand Down
2 changes: 1 addition & 1 deletion examples/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/alexliesenfeld/health/examples

go 1.18
go 1.21

require (
github.com/InVisionApp/go-health v2.1.0+incompatible
Expand Down

0 comments on commit 4e5dd5b

Please sign in to comment.