go-onerng/cmd/flush.go
Dave Henderson 926b9f6304
Some incomplete initial code
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
2018-08-01 23:47:54 -04:00

21 lines
411 B
Go

package cmd
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)
},
}
}