Skip to content

Commit

Permalink
Merge pull request #32 from InVisionApp/dselans/more-lint
Browse files Browse the repository at this point in the history
unexported an example struct to avoid linter complaints
  • Loading branch information
dselans authored Jan 2, 2018
2 parents eff1e2b + 28535b4 commit ecdeb48
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/custom-checker-server/custom-checker-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ import (
"github.com/InVisionApp/go-health/handlers"
)

type CustomCheck struct{}
type customCheck struct{}

func main() {
// Create a new health instance
h := health.New()

// Instantiate your custom check
customCheck := &CustomCheck{}
cc := &customCheck{}

// Add the checks to the health instance
h.AddChecks([]*health.Config{
{
Name: "good-check",
Checker: customCheck,
Checker: cc,
Interval: time.Duration(2) * time.Second,
Fatal: true,
},
Expand All @@ -42,7 +42,7 @@ func main() {
}

// Satisfy the go-health.ICheckable interface
func (c *CustomCheck) Status() (interface{}, error) {
func (c *customCheck) Status() (interface{}, error) {
// perform some sort of check
if false {
return nil, fmt.Errorf("Something major just broke")
Expand Down

0 comments on commit ecdeb48

Please sign in to comment.