From 87d60def7e11c40119e4634b38dd3c8742f12eef Mon Sep 17 00:00:00 2001 From: Martin Kysel Date: Mon, 26 Aug 2024 11:58:23 -0600 Subject: [PATCH] fix it now --- pkg/config/options.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pkg/config/options.go b/pkg/config/options.go index 835b89f7..dd082a42 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" choice:"console" choice:"json" default:"console"` + LogEncoding string ` long:"log-encoding" description:"Log encoding format. Either console or json" default:"console" choice:"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"` }