posadka/cmd/write.go

29 lines
450 B
Go
Raw Normal View History

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!")
}
},
}