diff options
| author | Shulhan <ms@kilabit.info> | 2023-09-20 02:01:54 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-09-20 02:01:54 +0700 |
| commit | 4fc1b3afb4956c412dbe40a9ecfde720b4941031 (patch) | |
| tree | 77e842a5cf7e55cfe86b57a725ad6baf9594bf71 /session.go | |
| parent | a80dacf43047268e801c56b3f6075824f69f5d81 (diff) | |
| download | awwan-4fc1b3afb4956c412dbe40a9ecfde720b4941031.tar.xz | |
all: remove rand.Seed
The latest ascii.Random use "cryto/rand", so there is no need to call
rand.Seed.
Diffstat (limited to 'session.go')
| -rw-r--r-- | session.go | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -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) |
