From ab10db81fb599482d18a66b58332c9015ac2ca6c Mon Sep 17 00:00:00 2001 From: Alok Date: Tue, 13 Aug 2024 19:43:46 +0530 Subject: [PATCH] fix: comments --- .github/workflows/ci.yml | 1 - testing/cmd/main.go | 12 ++++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c69796b9..682622c88 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -216,4 +216,3 @@ jobs: - go-modules - foundry - contracts - diff --git a/testing/cmd/main.go b/testing/cmd/main.go index 8f9f0cda8..3aa7a1d2c 100644 --- a/testing/cmd/main.go +++ b/testing/cmd/main.go @@ -21,8 +21,10 @@ var ( Required: true, EnvVars: []string{"MEV_COMMIT_TEST_SETTLEMENT_RPC_ENDPOINT"}, Action: func(_ *cli.Context, s string) error { - _, err := url.Parse(s) - return fmt.Errorf("invalid settlement RPC endpoint: %w", err) + if _, err := url.Parse(s); err != nil { + return fmt.Errorf("invalid settlement RPC endpoint: %w", err) + } + return nil }, } @@ -32,8 +34,10 @@ var ( Required: true, EnvVars: []string{"MEV_COMMIT_TEST_L1_RPC_ENDPOINT"}, Action: func(_ *cli.Context, s string) error { - _, err := url.Parse(s) - return fmt.Errorf("invalid L1 RPC endpoint: %w", err) + if _, err := url.Parse(s); err != nil { + return fmt.Errorf("invalid L1 RPC endpoint: %w", err) + } + return nil }, }