Skip to content

Commit

Permalink
split Run method
Browse files Browse the repository at this point in the history
  • Loading branch information
Songmu committed Aug 27, 2022
1 parent 973836c commit 67d608f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rcpr.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,15 @@ func Run(ctx context.Context, argv []string, outStream, errStream io.Writer) err
return printVersion(outStream)
}

// main logic follows
rp, err := newRcpr(ctx, &commander{
gitPath: "git", outStream: outStream, errStream: errStream, dir: "."})
if err != nil {
return err
}
return rp.Run(ctx)
}

func (rp *rcpr) Run(ctx context.Context) error {
latestSemverTag := rp.latestSemverTag()
currVerStr := latestSemverTag
if currVerStr == "" {
Expand Down

0 comments on commit 67d608f

Please sign in to comment.