Files
envy/cmd/pretty.go

22 lines
370 B
Go

package cmd
import (
"envy/cmd/utils"
"github.com/spf13/cobra"
)
// prettyCmd represents the pretty command
var prettyCmd = &cobra.Command{
Use: "pretty",
Short: "Format .env file according to UNIX syntax",
Run: func(cmd *cobra.Command, args []string) {
err := utils.RefactorEnv()
utils.StopIfErr(err)
},
}
func init() {
rootCmd.AddCommand(prettyCmd)
}