A bunch of changes

Signed-off-by: Dave Henderson <dhenderson@gmail.com>
This commit is contained in:
Dave Henderson
2018-08-20 20:06:33 -04:00
parent 16a4d2826c
commit a1879b1eb0
16 changed files with 274 additions and 203 deletions

20
cmd/onerng/flush.go Normal file
View File

@ -0,0 +1,20 @@
package main
import (
"context"
"github.com/hairyhenderson/go-onerng"
"github.com/spf13/cobra"
)
// flushCmd represents the flush command
func flushCmd(ctx context.Context) *cobra.Command {
return &cobra.Command{
Use: "flush",
Short: "Flush the OneRNG's entropy pool",
RunE: func(cmd *cobra.Command, args []string) error {
o := onerng.OneRNG{Path: opts.Device}
return o.Flush(ctx)
},
}
}