Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ issues:
max-issues-per-linter: 0
max-same-issues: 0
linters:
disable:
- depguard
enable:
- errcheck
- gosimple
Expand All @@ -12,9 +14,15 @@ linters:
- staticcheck
- unused
# Defaults above ours below
- copyloopvar
- usestdlibvars
- whitespace
presets:
- bugs
- format
- import
- performance
- unused
#linters-settings:
# errcheck:
# check-type-assertions: true
Expand Down
3 changes: 1 addition & 2 deletions cmd/tx-submit-api-mirror/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ import (
"fmt"
"os"

"go.uber.org/automaxprocs/maxprocs"

"github.com/blinklabs-io/tx-submit-api-mirror/internal/api"
"github.com/blinklabs-io/tx-submit-api-mirror/internal/config"
"github.com/blinklabs-io/tx-submit-api-mirror/internal/logging"
"go.uber.org/automaxprocs/maxprocs"
)

var cmdlineFlags struct {
Expand Down
7 changes: 3 additions & 4 deletions internal/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,13 @@ import (

models "github.com/blinklabs-io/cardano-models"
"github.com/blinklabs-io/gouroboros/ledger"
"github.com/blinklabs-io/tx-submit-api-mirror/internal/config"
"github.com/blinklabs-io/tx-submit-api-mirror/internal/logging"
"github.com/fxamacker/cbor/v2"
cors "github.com/gin-contrib/cors"
ginzap "github.com/gin-contrib/zap"
"github.com/gin-gonic/gin"
maestro "github.com/maestro-org/go-sdk/client"

"github.com/blinklabs-io/tx-submit-api-mirror/internal/config"
"github.com/blinklabs-io/tx-submit-api-mirror/internal/logging"
)

func Start(cfg *config.Config) error {
Expand Down Expand Up @@ -186,7 +185,7 @@ func handleSubmitTx(c *gin.Context) {
return
}
defer resp.Body.Close()
if resp.StatusCode == 202 {
if resp.StatusCode == http.StatusAccepted {
logger.Infow(
fmt.Sprintf(
"successfully submitted transaction %s to backend %s",
Expand Down
3 changes: 1 addition & 2 deletions internal/logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ import (
"log"
"time"

"github.com/blinklabs-io/tx-submit-api-mirror/internal/config"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"

"github.com/blinklabs-io/tx-submit-api-mirror/internal/config"
)

type Logger = zap.SugaredLogger
Expand Down
Loading