Revert "chore: upgrade standard packages" due to https://github.com/golangci/golangci-lint/issues/4415
This reverts commit ad0c6d5eb1.
This commit is contained in:
parent
ad0c6d5eb1
commit
2061dd382c
2 changed files with 5 additions and 4 deletions
|
|
@ -2,7 +2,7 @@ package ocpp
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"math/rand/v2"
|
||||
"math/rand"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ func New(conf map[string]interface{}, site site.API) (*OCPP, error) {
|
|||
if err == nil {
|
||||
cc.StationID = fmt.Sprintf("evcc-%s", strings.ToLower(id))
|
||||
} else {
|
||||
cc.StationID = fmt.Sprintf("evcc-%d", rand.Uint32())
|
||||
cc.StationID = fmt.Sprintf("evcc-%d", rand.Int31())
|
||||
}
|
||||
log.DEBUG.Println("station id:", cc.StationID)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package mqtt
|
|||
import (
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"math/rand/v2"
|
||||
"math/rand"
|
||||
"strings"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
|
@ -20,7 +20,8 @@ var Instance *Client
|
|||
|
||||
// ClientID created unique mqtt client id
|
||||
func ClientID() string {
|
||||
return fmt.Sprintf("evcc-%d", rand.Uint32())
|
||||
pid := rand.Int31()
|
||||
return fmt.Sprintf("evcc-%d", pid)
|
||||
}
|
||||
|
||||
// Config is the public configuration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue