We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bc31d4 commit e303a2bCopy full SHA for e303a2b
libvirt/utils_net.go
@@ -2,7 +2,7 @@ package libvirt
2
3
import (
4
"fmt"
5
- "math/rand"
+ "crypto/rand"
6
"net"
7
)
8
@@ -12,7 +12,6 @@ import (
12
//nolint:mnd
13
func randomMACAddress() (string, error) {
14
buf := make([]byte, 3)
15
- //nolint:gosec // math.rand is enough for this
16
if _, err := rand.Read(buf); err != nil {
17
return "", err
18
}
main.go
@@ -1,17 +1,10 @@
1
package main
- "time"
-
"github.com/dmacvicar/terraform-provider-libvirt/libvirt"
"github.com/hashicorp/terraform-plugin-sdk/v2/plugin"
9
10
11
-func init() {
- rand.Seed(time.Now().UTC().UnixNano())
-}
func main() {
defer libvirt.CleanupLibvirtConnections()
0 commit comments