cert_stub.go 448 B

12345678910111213141516171819202122232425
  1. // +build !cert
  2. package cmd
  3. import (
  4. "fmt"
  5. "os"
  6. "github.com/urfave/cli"
  7. )
  8. var Cert = cli.Command{
  9. Name: "cert",
  10. Usage: "Generate self-signed certificate",
  11. Description: `Please use build tags "cert" to rebuild Gitote in order to have this ability`,
  12. Action: runCert,
  13. }
  14. func runCert(ctx *cli.Context) error {
  15. fmt.Println("Command cert not available, please use build tags 'cert' to rebuild.")
  16. os.Exit(1)
  17. return nil
  18. }