Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yperbasis committed Oct 23, 2023
1 parent bb8eeb9 commit b7da6f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -752,12 +752,14 @@ func (c *BorConfig) IsSprintStart(number uint64) bool {
func borKeyValueConfigHelper[T uint64 | string](field map[string]T, number uint64) T {
keys := make([]uint64, 0, len(field))
fieldUint := make(map[uint64]T)

for k, v := range field {
keyUint, err := strconv.ParseUint(k, 10, 64)
if err != nil {
panic(err)
}
keys = append(keys, keyUint)

fieldUint[keyUint] = v
}

Expand Down
2 changes: 2 additions & 0 deletions params/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ func TestConfigRules(t *testing.T) {
}

func TestBorKeyValueConfigHelper(t *testing.T) {
t.Parallel()

backupMultiplier := map[string]uint64{
"0": 2,
"25275000": 5,
Expand Down

0 comments on commit b7da6f4

Please sign in to comment.