mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 13:04:02 +03:00
Update golangci-lint
This commit is contained in:
@@ -10,7 +10,7 @@ type TypeConcurrency struct {
|
||||
}
|
||||
|
||||
func (t *TypeConcurrency) Set(value string) error {
|
||||
concurrencyValue, err := strconv.ParseUint(value, 10, 16) // nolint: gomnd
|
||||
concurrencyValue, err := strconv.ParseUint(value, 10, 16) //nolint: gomnd
|
||||
if err != nil {
|
||||
return fmt.Errorf("value is not uint (%s): %w", value, err)
|
||||
}
|
||||
@@ -41,5 +41,5 @@ func (t TypeConcurrency) MarshalJSON() ([]byte, error) {
|
||||
}
|
||||
|
||||
func (t TypeConcurrency) String() string {
|
||||
return strconv.FormatUint(uint64(t.Value), 10) // nolint: gomnd
|
||||
return strconv.FormatUint(uint64(t.Value), 10) //nolint: gomnd
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ type TypeErrorRate struct {
|
||||
}
|
||||
|
||||
func (t *TypeErrorRate) Set(value string) error {
|
||||
parsedValue, err := strconv.ParseFloat(value, 64) // nolint: gomnd
|
||||
parsedValue, err := strconv.ParseFloat(value, 64) //nolint: gomnd
|
||||
if err != nil {
|
||||
return fmt.Errorf("value is not a float (%s): %w", value, err)
|
||||
}
|
||||
@@ -43,5 +43,5 @@ func (t TypeErrorRate) MarshalJSON() ([]byte, error) {
|
||||
}
|
||||
|
||||
func (t TypeErrorRate) String() string {
|
||||
return strconv.FormatFloat(t.Value, 'f', -1, 64) // nolint: gomnd
|
||||
return strconv.FormatFloat(t.Value, 'f', -1, 64) //nolint: gomnd
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ func (t *TypeHostPort) Set(value string) error {
|
||||
return fmt.Errorf("incorrect host:port value (%v): %w", value, err)
|
||||
}
|
||||
|
||||
portValue, err := strconv.ParseUint(port, 10, 16) // nolint: gomnd
|
||||
portValue, err := strconv.ParseUint(port, 10, 16) //nolint: gomnd
|
||||
if err != nil {
|
||||
return fmt.Errorf("incorrect port number (%v): %w", value, err)
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ type TypePort struct {
|
||||
}
|
||||
|
||||
func (t *TypePort) Set(value string) error {
|
||||
portValue, err := strconv.ParseUint(value, 10, 16) // nolint: gomnd
|
||||
portValue, err := strconv.ParseUint(value, 10, 16) //nolint: gomnd
|
||||
if err != nil {
|
||||
return fmt.Errorf("incorrect port number (%v): %w", value, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user