added fix-comment subcommand
move the spotify url from comments to own tag (spotify)
This commit is contained in:
@@ -16,10 +16,16 @@ type SortCmd struct {
|
||||
Path string `arg:"positional,required"`
|
||||
}
|
||||
|
||||
type FixCommentCmd struct {
|
||||
Path string `arg:"positional,required"`
|
||||
}
|
||||
|
||||
type args struct {
|
||||
Info *InfoCmd `arg:"subcommand:info"`
|
||||
Sort *SortCmd `arg:"subcommand:sort"`
|
||||
Verbose bool `arg:"-v" default:"false"`
|
||||
Info *InfoCmd `arg:"subcommand:info"`
|
||||
Sort *SortCmd `arg:"subcommand:sort"`
|
||||
FixCommentTag *FixCommentCmd `arg:"subcommand:fix-comment"`
|
||||
Verbose bool `arg:"-v" default:"false"`
|
||||
DryRun bool `arg:"--dry-run" default:"false"`
|
||||
}
|
||||
|
||||
func Run() {
|
||||
@@ -35,6 +41,8 @@ func Run() {
|
||||
ripsort.Scan(args.Info.File)
|
||||
case args.Sort != nil:
|
||||
ripsort.Sort(args.Sort.Dst, args.Sort.Path)
|
||||
case args.FixCommentTag != nil:
|
||||
ripsort.FixComment(args.FixCommentTag.Path, args.DryRun)
|
||||
default:
|
||||
p.Fail("Must specify command")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user