mirror of
https://github.com/bdnugget/eggos.git
synced 2026-11-07 04:17:27 +00:00
19 lines
244 B
Go
19 lines
244 B
Go
package fs
|
|
|
|
import "math/rand"
|
|
|
|
type zero struct{}
|
|
|
|
func (z zero) Read(b []byte) (int, error) {
|
|
for i := range b {
|
|
b[i] = 0
|
|
}
|
|
return len(b), nil
|
|
}
|
|
|
|
type random struct{}
|
|
|
|
func (r random) Read(b []byte) (int, error) {
|
|
return rand.Read(b)
|
|
}
|