Skip to content

Commit 093d53c

Browse files
authored
Move version under pkg/ (#273)
2 parents ce5334c + 10bbc15 commit 093d53c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

internal/choose/choose.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/anttiharju/vmatch/internal/inject"
88
"github.com/anttiharju/vmatch/internal/language"
99
"github.com/anttiharju/vmatch/internal/linter"
10-
"github.com/anttiharju/vmatch/internal/version"
10+
"github.com/anttiharju/vmatch/pkg/version"
1111
)
1212

1313
func firstArgIs(arg string, args []string) bool {

internal/version/version.go renamed to pkg/version/version.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ package version
33
import (
44
"fmt"
55
"runtime/debug"
6+
"strings"
67
)
78

89
func Print() int {
910
if buildInfo, ok := debug.ReadBuildInfo(); ok {
10-
version := buildInfo.Main.Version[1:] // remove "v" prefix
11+
version := strings.TrimPrefix(buildInfo.Main.Version, "v")
1112
goVersion := buildInfo.GoVersion
1213

1314
var revision, buildTime string

0 commit comments

Comments
 (0)