code: func ensureSuperuser(cf func(cmd *cobra.Command, args []string)) func(cmd *cobra.Command, args []string) {
  	return func(cmd *cobra.Command, args []string) {
  		if os.Geteuid() != 0 {
  			stderr.Print("cannot run as unprivileged user")
  			cmdExitCode = 254
  			return
  		}
  
  		cf(cmd, args)
  	}
  }
docs: // ensureSuperuser will error out if the effective UID of the current process
  // is not zero. Otherwise, it will invoke the supplied cobra command.