]> Cypherpunks.ru repositories - govpn.git/blobdiff - src/cypherpunks.ru/govpn/egd.go
golint fixes
[govpn.git] / src / cypherpunks.ru / govpn / egd.go
index 3d0b7918b26044353c83a408fbdb1b7d4c0750a8..f06411f468eeee0f064656314f9b4dae0a2d6991 100644 (file)
@@ -1,6 +1,6 @@
 /*
 GoVPN -- simple secure free software virtual private network daemon
-Copyright (C) 2014-2016 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2014-2017 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -24,10 +24,10 @@ import (
        "net"
 )
 
-var (
-       Rand io.Reader = rand.Reader
-)
+// Rand is a source of entropy
+var Rand = rand.Reader
 
+// EGDRand is a EGD source of entropy
 type EGDRand string
 
 // Read n bytes from EGD, blocking mode.
@@ -41,6 +41,7 @@ func (egdPath EGDRand) Read(b []byte) (int, error) {
        return io.ReadFull(conn, b)
 }
 
+// EGDInit set random source to a EGD socket
 func EGDInit(path string) {
        Rand = EGDRand(path)
 }