1
0
mirror of https://github.com/0rangebananaspy/authelia.git synced 2024-09-14 22:47:21 +07:00
authelia/cmd/authelia-scripts/cmd/clean.go
James Elliott 5304178165
ci: add dedicated authelia-gen command ()
Adds a dedicated authelia code/doc gen command.
2022-06-14 22:40:00 +10:00

31 lines
494 B
Go

package cmd
import (
"os"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
func newCleanCmd() (cmd *cobra.Command) {
cmd = &cobra.Command{
Use: "clean",
Short: cmdCleanShort,
Long: cmdCleanLong,
Example: cmdCleanExample,
Args: cobra.NoArgs,
Run: cmdCleanRun,
}
return cmd
}
func cmdCleanRun(_ *cobra.Command, _ []string) {
log.Debug("Removing `" + OutputDir + "` directory")
err := os.RemoveAll(OutputDir)
if err != nil {
panic(err)
}
}