Skip to content

Commit

Permalink
chore: fixed linting
Browse files Browse the repository at this point in the history
  • Loading branch information
freak12techno committed Dec 9, 2023
1 parent 5a63225 commit 6a0091c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ linters:
- gocyclo
- maintidx
- deadcode
- depguard
13 changes: 7 additions & 6 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package config

import (
"fmt"
"github.com/rs/zerolog"
"os"

"github.com/rs/zerolog"

"github.com/BurntSushi/toml"
"github.com/creasty/defaults"
)
Expand All @@ -24,7 +25,7 @@ func (v *Validator) Validate() error {

type DenomInfo struct {
Denom string `toml:"denom"`
DenomCoefficient int64 `toml:"denom-coefficient "default:"1000000"`
DenomCoefficient int64 `default:"1000000" toml:"denom-coefficient "`
DisplayDenom string `toml:"display-denom"`
CoingeckoCurrency string `toml:"coingecko-currency"`
DexScreenerChainID string `toml:"dex-screener-chain-id"`
Expand Down Expand Up @@ -93,14 +94,14 @@ func (c *Chain) QueryEnabled(query string) bool {

type Config struct {
LogConfig LogConfig `toml:"log"`
ListenAddress string `toml:"listen-address" default:":9550"`
Timeout int `toml:"timeout" default:"10"`
ListenAddress string `default:":9550" toml:"listen-address"`
Timeout int `default:"10" toml:"timeout"`
Chains []Chain `toml:"chains"`
}

type LogConfig struct {
LogLevel string `toml:"level" default:"info"`
JSONOutput bool `toml:"json" default:"false"`
LogLevel string `default:"info" toml:"level"`
JSONOutput bool `default:"false" toml:"json"`
}

func (c *Config) Validate() error {
Expand Down

0 comments on commit 6a0091c

Please sign in to comment.