Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yashnevatia committed Jan 4, 2024
1 parent 85210e2 commit af2e183
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"math/big"

Check failure on line 5 in cmd/start.go

View workflow job for this annotation

GitHub Actions / Golang Lint

File is not `gofmt`-ed with `-s` (gofmt)
"fmt"
"os"
"http"
"net/http"

"github.com/smartcontractkit/timelock-worker/pkg/cli"
"github.com/smartcontractkit/timelock-worker/pkg/timelock"
Expand Down Expand Up @@ -42,11 +42,11 @@ func startCommand() *cobra.Command {
}

func startHandlerAndServer(cmd *cobra.Command, _ []string) {
startHandler()
// startHandler(cmd)
startServer()
}

func startHandler(cmd *cobra.Command, _ []string) {
func startHandler(cmd *cobra.Command) {
// Use this ctx as the base context.
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
Expand Down Expand Up @@ -94,7 +94,7 @@ func startHandler(cmd *cobra.Command, _ []string) {
}

// starts a http server, serving the healthz endpoint

Check failure on line 96 in cmd/start.go

View workflow job for this annotation

GitHub Actions / Golang Lint

Comment should end in a period (godot)
func startServer(cmd *cobra.Command, _ []string) {
func startServer() {
http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
fmt.Fprintln(w, "OK")
Expand Down

0 comments on commit af2e183

Please sign in to comment.