mirror of
https://github.com/hairyhenderson/go-onerng.git
synced 2025-07-07 19:05:08 -05:00
Some incomplete initial code
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
This commit is contained in:
20
cmd/flush.go
Normal file
20
cmd/flush.go
Normal file
@ -0,0 +1,20 @@
|
||||
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)
|
||||
},
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user