summaryrefslogtreecommitdiffstats
path: root/pkg/commands
diff options
context:
space:
mode:
authorMikael Elkiaer <2102306+MikaelElkiaer@users.noreply.github.com>2022-01-18 14:05:48 +0100
committerJesse Duffield <jessedduffield@gmail.com>2022-01-25 23:23:55 +1100
commit874e230aefb8b7fce1fa99dbeaa9528166c1c788 (patch)
treef318338dc9ed5c1195b18a72b063a6e54dfaac94 /pkg/commands
parent4da5795ef16e1c37441674e02d1164ef4f81cd15 (diff)
run go fmt
Diffstat (limited to 'pkg/commands')
-rw-r--r--pkg/commands/hosting_service/hosting_service.go2
-rw-r--r--pkg/commands/hosting_service/hosting_service_test.go16
2 files changed, 9 insertions, 9 deletions
diff --git a/pkg/commands/hosting_service/hosting_service.go b/pkg/commands/hosting_service/hosting_service.go
index 42c51c86b..01e07e9eb 100644
--- a/pkg/commands/hosting_service/hosting_service.go
+++ b/pkg/commands/hosting_service/hosting_service.go
@@ -2,9 +2,9 @@ package hosting_service
import (
"fmt"
+ "net/url"
"regexp"
"strings"
- "net/url"
"github.com/go-errors/errors"
"github.com/jesseduffield/lazygit/pkg/i18n"
diff --git a/pkg/commands/hosting_service/hosting_service_test.go b/pkg/commands/hosting_service/hosting_service_test.go
index d99281194..98c097a33 100644
--- a/pkg/commands/hosting_service/hosting_service_test.go
+++ b/pkg/commands/hosting_service/hosting_service_test.go
@@ -221,20 +221,20 @@ func TestGetPullRequestURL(t *testing.T) {
expectedLoggedErrors: []string{"Unknown git service type: 'noservice'. Expected one of github, bitbucket, gitlab"},
},
{
- testName: "Escapes reserved URL characters in from branch name",
- from: "feature/someIssue#123",
- to: "master",
- remoteUrl: "git@gitlab.com:me/public/repo-with-issues.git",
+ testName: "Escapes reserved URL characters in from branch name",
+ from: "feature/someIssue#123",
+ to: "master",
+ remoteUrl: "git@gitlab.com:me/public/repo-with-issues.git",
test: func(url string, err error) {
assert.NoError(t, err)
assert.Equal(t, "https://gitlab.com/me/public/repo-with-issues/merge_requests/new?merge_request[source_branch]=feature%2FsomeIssue%23123&merge_request[target_branch]=master", url)
},
},
{
- testName: "Escapes reserved URL characters in to branch name",
- from: "yolo",
- to: "archive/never-ending-feature#666",
- remoteUrl: "git@gitlab.com:me/public/repo-with-issues.git",
+ testName: "Escapes reserved URL characters in to branch name",
+ from: "yolo",
+ to: "archive/never-ending-feature#666",
+ remoteUrl: "git@gitlab.com:me/public/repo-with-issues.git",
test: func(url string, err error) {
assert.NoError(t, err)
assert.Equal(t, "https://gitlab.com/me/public/repo-with-issues/merge_requests/new?merge_request[source_branch]=yolo&merge_request[target_branch]=archive%2Fnever-ending-feature%23666", url)