go-onerng/cmd/init.go
Dave Henderson 008a314137
a bunch of updates, including verify function
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
2018-08-09 00:30:16 -04:00

22 lines
407 B
Go

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