mirror of
https://github.com/hairyhenderson/go-onerng.git
synced 2025-07-07 10:55:44 -05:00
A bunch of changes
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
This commit is contained in:
21
cmd/onerng/init.go
Normal file
21
cmd/onerng/init.go
Normal file
@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/hairyhenderson/go-onerng"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// initCmd represents the init command
|
||||
func initCmd(ctx context.Context) *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "init",
|
||||
Short: "Initialize the RNG",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
o := onerng.OneRNG{Path: opts.Device}
|
||||
err := o.Init(ctx)
|
||||
return err
|
||||
},
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user