Skip to content

Commit 7ac12aa

Browse files
committed
- Remove unneeded rand.Seed() invocation. Not needed since go 1.20
- go-staticcheck
1 parent eebe8c5 commit 7ac12aa

2 files changed

Lines changed: 2 additions & 13 deletions

File tree

replyParser.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func parseReply(line string) (*Reply, error) {
5757
line = strings.TrimSpace(line)
5858
parts := strings.Split(line, " ")
5959
if len(parts) < 3 {
60-
return nil, fmt.Errorf("Malformed Reply.\n%s\n", line)
60+
return nil, fmt.Errorf("malformed Reply.\n%s", line)
6161
}
6262
preParseReply := func() []string {
6363
val := ""
@@ -98,7 +98,7 @@ func parseReply(line string) (*Reply, error) {
9898
kvPair := strings.SplitN(v, "=", 2)
9999
if kvPair != nil {
100100
if len(kvPair) != 2 {
101-
return nil, fmt.Errorf("Malformed key-value-pair len != 2.\n%s\n", kvPair)
101+
return nil, fmt.Errorf("malformed key-value-pair len != 2.\n%s", kvPair)
102102
}
103103
}
104104
r.Pairs[kvPair[0]] = kvPair[len(kvPair)-1]

sessions.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
package gosam
22

3-
import (
4-
5-
// "math"
6-
"math/rand"
7-
"time"
8-
)
9-
10-
func init() {
11-
rand.Seed(time.Now().UnixNano())
12-
}
13-
143
// CreateSession creates a new Session of type style, with an optional destination.
154
// an empty destination is interpreted as "TRANSIENT"
165
// Returns the destination for the new Client or an error.

0 commit comments

Comments
 (0)