Skip to content

Commit 7280780

Browse files
committed
refactor(vote-registration): remove unused globalRand and helper funcs
1 parent 8eefd03 commit 7280780

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

pkg/mocai/entities/voteregistration/countries/brazilian_vote_registration.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,11 @@ package countries
22

33
import (
44
"fmt"
5-
"math/rand"
65
"strconv"
7-
"time"
86

97
"github.com/brazzcore/mocai/pkg/mocai/translations"
108
)
119

12-
var (
13-
globalRand = rand.New(rand.NewSource(time.Now().UnixNano()))
14-
)
15-
1610
// BrazilianVoteRegistration represents a Brazilian vote registration
1711
type BrazilianVoteRegistration struct {
1812
Section string
@@ -25,16 +19,6 @@ func NewBrazilianVoteRegistration(isFormatted bool) (*BrazilianVoteRegistration,
2519
return NewBrazilianVoteRegistrationCustom("ptbr", isFormatted, nil)
2620
}
2721

28-
// randomInt generates a random integer between min and max
29-
func randomInt(min, max int) int {
30-
return globalRand.Intn(max-min+1) + min
31-
}
32-
33-
// randomInt3Digits generates a random 3 digit number
34-
func randomInt3Digits() string {
35-
return fmt.Sprintf("%03d", globalRand.Intn(1000))
36-
}
37-
3822
// calculateCheckDigit1 calculates the first check digit.
3923
// it depends on the sequence number.
4024
func calculateCheckDigit1(sequenceNumber string) (string, error) {

0 commit comments

Comments
 (0)