From 4fc1b3afb4956c412dbe40a9ecfde720b4941031 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Wed, 20 Sep 2023 02:01:54 +0700 Subject: all: remove rand.Seed The latest ascii.Random use "cryto/rand", so there is no need to call rand.Seed. --- session.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/session.go b/session.go index 19a6a1d..443b6ae 100644 --- a/session.go +++ b/session.go @@ -5,12 +5,10 @@ package awwan import ( "fmt" - "math/rand" "os" "os/exec" "path/filepath" "strings" - "time" "github.com/shuLhan/share/lib/ascii" "github.com/shuLhan/share/lib/ini" @@ -60,7 +58,6 @@ func NewSession(baseDir, sessionDir string) (ses *Session, err error) { return nil, fmt.Errorf("%s: %w", logp, err) } - rand.Seed(time.Now().Unix()) randomString = string(ascii.Random([]byte(ascii.LettersNumber), 16)) ses.tmpDir = filepath.Join(defTmpDir, randomString) -- cgit v1.3