Skip to content

Commit

Permalink
fix: rand.Seed deprecated as auto seeding is now the default golang/g…
Browse files Browse the repository at this point in the history
  • Loading branch information
phanyzewski committed Apr 1, 2023
1 parent 591fe0c commit f3127d0
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,15 @@ import (
"encoding/json"
"flag"
"fmt"
"math/rand"
"os"
"strings"
"sync"
"time"

"github.com/imup-io/client/util"
gw "github.com/jackpal/gateway"
)

var (
seedRandom sync.Once
setupFlags sync.Once

apiKey *string
Expand Down Expand Up @@ -110,9 +107,6 @@ type remoteConfigResp struct {
func New() (Reloadable, error) {
// do not instantiate a new copy of config, use the package level global
cfg = &config{}
seedRandom.Do(func() {
rand.Seed(time.Now().UTC().UnixNano())
})

setupFlags.Do(func() {
apiKey = flag.String("key", "", "api key")
Expand Down

0 comments on commit f3127d0

Please sign in to comment.