From 67d608f105b6446570ecb52afdec21072bafd616 Mon Sep 17 00:00:00 2001 From: Songmu Date: Sat, 27 Aug 2022 20:25:32 +0900 Subject: [PATCH] split Run method --- rcpr.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rcpr.go b/rcpr.go index 095ffe6..bc67896 100644 --- a/rcpr.go +++ b/rcpr.go @@ -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 == "" {