This repository has been archived on 2023-11-08. You can view files and clone it, but cannot push or open issues/pull-requests.
imp/main.go

38 lines
698 B
Go

package main
import (
"os"
"github.com/urfave/cli/v2"
"go.jolheiser.com/beaver"
)
func main() {
app := cli.NewApp()
app.Name = "Imp"
app.Usage = "Re-order imports"
app.Flags = []cli.Flag{
&cli.BoolFlag{
Name: "write",
Aliases: []string{"w"},
Usage: "Write the re-ordered imports instead of just printing them",
},
&cli.BoolFlag{
Name: "verbose",
Aliases: []string{"v"},
Usage: "Print more information",
},
&cli.StringFlag{
Name: "imp-ignore",
Aliases: []string{"i"},
Usage: "Path to a .impignore file for globs",
Value: ".impignore",
},
}
app.Action = runImp
if err := app.Run(os.Args); err != nil {
beaver.Fatal(err)
}
}