summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-09-20 02:01:54 +0700
committerShulhan <ms@kilabit.info>2023-09-20 02:01:54 +0700
commit4fc1b3afb4956c412dbe40a9ecfde720b4941031 (patch)
tree77e842a5cf7e55cfe86b57a725ad6baf9594bf71
parenta80dacf43047268e801c56b3f6075824f69f5d81 (diff)
downloadawwan-4fc1b3afb4956c412dbe40a9ecfde720b4941031.tar.xz
all: remove rand.Seed
The latest ascii.Random use "cryto/rand", so there is no need to call rand.Seed.
-rw-r--r--session.go3
1 files changed, 0 insertions, 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)