posadka/cmd/write.go
Simon de Vlieger 0877745cda
sketch: commandline interface
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2024-12-28 10:30:02 +01:00

28 lines
450 B
Go

package cmd
import (
"github.com/spf13/cobra"
"integralnaya.com/software/posadka/internal"
)
func init() {
rootCmd.AddCommand(writeCmd)
}
var writeCmd = &cobra.Command{
Use: "write",
Short: "Print the write number of Hugo",
Long: `All software has writes. This is Hugo's`,
Run: func(cmd *cobra.Command, args []string) {
root, err := internal.AmIRoot()
if err != nil {
panic(err)
}
if !root {
panic("no root!")
}
},
}