Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Hwang <126002920+sthwang-metal@users.noreply.github.com>
  • Loading branch information
sthwang-metal committed Feb 14, 2024
1 parent 970284c commit 4a6ad14
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var (
var serveCmd = &cobra.Command{
Use: "serve",
Short: "Start the load balancer Graph API",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, _ []string) error {
if pidFileName != "" {
if err := writePidFile(pidFileName); err != nil {
logger.Error("failed to write pid file", zap.Error(err))
Expand Down
4 changes: 2 additions & 2 deletions pkg/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,11 @@ func TestNodeMetadata(t *testing.T) {

func mustNewGQLTestClient(respJSON string, respCode int) *graphql.Client {
mux := http.NewServeMux()
mux.HandleFunc("/query", func(w http.ResponseWriter, req *http.Request) {
mux.HandleFunc("/query", func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(respCode)
w.Header().Set("Content-Type", "application/json")
_, err := io.WriteString(w, respJSON)

_, err := io.WriteString(w, respJSON)
if err != nil {
panic(err)
}
Expand Down
8 changes: 4 additions & 4 deletions x/pubsubinfo/gql_hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
//
//nolint:goerr113
var (
removeNodeGoModel = func(g *gen.Graph, s *ast.Schema) error {
removeNodeGoModel = func(_ *gen.Graph, s *ast.Schema) error {
n, ok := s.Types["Node"]
if !ok {
return errors.New("failed to find node interface in schema")
Expand All @@ -47,7 +47,7 @@ var (
return nil
}

removeNodeQueries = func(g *gen.Graph, s *ast.Schema) error {
removeNodeQueries = func(_ *gen.Graph, s *ast.Schema) error {
q, ok := s.Types["Query"]
if !ok {
return errors.New("failed to find query definition in schema")
Expand All @@ -69,7 +69,7 @@ var (
return nil
}

setPageInfoShareable = func(g *gen.Graph, s *ast.Schema) error {
setPageInfoShareable = func(_ *gen.Graph, s *ast.Schema) error {
q, ok := s.Types["PageInfo"]
if !ok {
return nil
Expand All @@ -80,7 +80,7 @@ var (
return nil
}

addJSONScalar = func(g *gen.Graph, s *ast.Schema) error {
addJSONScalar = func(_ *gen.Graph, s *ast.Schema) error {
s.Types["JSON"] = &ast.Definition{
Kind: ast.Scalar,
Description: "A valid JSON string.",
Expand Down

0 comments on commit 4a6ad14

Please sign in to comment.