1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

run go fmt

This commit is contained in:
Mikael Elkiaer
2022-01-18 14:05:48 +01:00
committed by Jesse Duffield
parent 4da5795ef1
commit 874e230aef
2 changed files with 9 additions and 9 deletions

View File

@ -2,9 +2,9 @@ package hosting_service
import ( import (
"fmt" "fmt"
"net/url"
"regexp" "regexp"
"strings" "strings"
"net/url"
"github.com/go-errors/errors" "github.com/go-errors/errors"
"github.com/jesseduffield/lazygit/pkg/i18n" "github.com/jesseduffield/lazygit/pkg/i18n"

View File

@ -221,20 +221,20 @@ func TestGetPullRequestURL(t *testing.T) {
expectedLoggedErrors: []string{"Unknown git service type: 'noservice'. Expected one of github, bitbucket, gitlab"}, expectedLoggedErrors: []string{"Unknown git service type: 'noservice'. Expected one of github, bitbucket, gitlab"},
}, },
{ {
testName: "Escapes reserved URL characters in from branch name", testName: "Escapes reserved URL characters in from branch name",
from: "feature/someIssue#123", from: "feature/someIssue#123",
to: "master", to: "master",
remoteUrl: "git@gitlab.com:me/public/repo-with-issues.git", remoteUrl: "git@gitlab.com:me/public/repo-with-issues.git",
test: func(url string, err error) { test: func(url string, err error) {
assert.NoError(t, err) 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) 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", testName: "Escapes reserved URL characters in to branch name",
from: "yolo", from: "yolo",
to: "archive/never-ending-feature#666", to: "archive/never-ending-feature#666",
remoteUrl: "git@gitlab.com:me/public/repo-with-issues.git", remoteUrl: "git@gitlab.com:me/public/repo-with-issues.git",
test: func(url string, err error) { test: func(url string, err error) {
assert.NoError(t, err) 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) 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)