diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8b8cb088..c94dd4dc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,11 +19,11 @@ jobs: - uses: actions/setup-go@v3 with: go-version-file: go.mod - - run: go install github.com/segmentio/golines - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: args: --timeout=5m --config .golangci.yaml + - run: go install github.com/segmentio/golines - name: golines uses: nickcharlton/diff-check@main with: diff --git a/pkg/config/options.go b/pkg/config/options.go index dd082a42..835b89f7 100644 --- a/pkg/config/options.go +++ b/pkg/config/options.go @@ -9,29 +9,29 @@ type ApiOptions struct { } type ContractsOptions struct { - RpcUrl string `long:"rpc-url" description:"Blockchain RPC URL"` - NodesContractAddress string `long:"nodes-address" description:"Node contract address"` + RpcUrl string `long:"rpc-url" description:"Blockchain RPC URL"` + NodesContractAddress string `long:"nodes-address" description:"Node contract address"` MessagesContractAddress string `long:"messages-address" description:"Message contract address"` - RefreshInterval time.Duration `long:"refresh-interval" description:"Refresh interval" default:"60s"` + RefreshInterval time.Duration `long:"refresh-interval" description:"Refresh interval" default:"60s"` } type DbOptions struct { ReaderConnectionString string `long:"reader-connection-string" description:"Reader connection string"` - WriterConnectionString string `long:"writer-connection-string" description:"Writer connection string" required:"true"` - ReadTimeout time.Duration `long:"read-timeout" description:"Timeout for reading from the database" default:"10s"` - WriteTimeout time.Duration `long:"write-timeout" description:"Timeout for writing to the database" default:"10s"` - MaxOpenConns int `long:"max-open-conns" description:"Maximum number of open connections" default:"80"` - WaitForDB time.Duration `long:"wait-for" description:"wait for DB on start, up to specified duration"` + WriterConnectionString string `long:"writer-connection-string" description:"Writer connection string" required:"true"` + ReadTimeout time.Duration `long:"read-timeout" description:"Timeout for reading from the database" default:"10s"` + WriteTimeout time.Duration `long:"write-timeout" description:"Timeout for writing to the database" default:"10s"` + MaxOpenConns int `long:"max-open-conns" description:"Maximum number of open connections" default:"80"` + WaitForDB time.Duration `long:"wait-for" description:"wait for DB on start, up to specified duration"` } type ServerOptions struct { - LogLevel string `short:"l" long:"log-level" description:"Define the logging level, supported strings are: DEBUG, INFO, WARN, ERROR, DPANIC, PANIC, FATAL, and their lower-case forms." default:"INFO"` + LogLevel string `short:"l" long:"log-level" description:"Define the logging level, supported strings are: DEBUG, INFO, WARN, ERROR, DPANIC, PANIC, FATAL, and their lower-case forms." default:"INFO"` //nolint:staticcheck - LogEncoding string ` long:"log-encoding" description:"Log encoding format. Either console or json" default:"console" choice:"console"` + LogEncoding string `long:"log-encoding" description:"Log encoding format. Either console or json" choice:"console" choice:"json" default:"console"` PrivateKeyString string `long:"private-key" description:"Private key to use for the node"` - API ApiOptions `group:"API Options" namespace:"api"` - DB DbOptions `group:"Database Options" namespace:"db"` + API ApiOptions `group:"API Options" namespace:"api"` + DB DbOptions `group:"Database Options" namespace:"db"` Contracts ContractsOptions `group:"Contracts Options" namespace:"contracts"` }