Skip to content

Commit 9eda1b0

Browse files
authored
Escape . in regex (#59)
1 parent e135b83 commit 9eda1b0

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
111111
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
112112
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
113113
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
114-
golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA=
115-
golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
116114
golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs=
117115
golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
118116
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=

internal/git/git.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func (g *Git) RepoName() string {
151151
}
152152

153153
remoteURL := string(output)
154-
re := regexp.MustCompile(`\S\s*\S+.com\S{1}(\S*) \(push\)`)
154+
re := regexp.MustCompile(`\S\s*\S+\.com\S{1}(\S*) \(push\)`)
155155
match := re.FindStringSubmatch(remoteURL)
156156
if len(match) >= 2 {
157157
return strings.Split(match[1], ".git")[0]

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
var (
2323
packageOwner = "emmahsax"
2424
packageRepository = "go-git-helper"
25-
packageVersion = "0.0.10"
25+
packageVersion = "0.0.11"
2626
)
2727

2828
func main() {

0 commit comments

Comments
 (0)