add /v2 to the module name to resolve the module path problem

This commit is contained in:
Mike Lundy 2020-04-16 16:02:37 -07:00
Родитель d5dc53669c
Коммит c4dfa597b8
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 0B40134B0A3E8BE3
80 изменённых файлов: 151 добавлений и 151 удалений

Просмотреть файл

@ -51,7 +51,7 @@ bin/hub: $(SOURCES)
script/build -o $@
bin/md2roff: $(SOURCES)
go build -o $@ github.com/github/hub/md2roff-bin
go build -o $@ github.com/github/hub/v2/md2roff-bin
test:
go test ./...

Просмотреть файл

@ -8,7 +8,7 @@ import (
"strings"
"syscall"
"github.com/github/hub/ui"
"github.com/github/hub/v2/ui"
)
// Cmd is a project-wide struct that represents a command to be run in the console.

Просмотреть файл

@ -3,7 +3,7 @@ package cmd
import (
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestNew(t *testing.T) {

Просмотреть файл

@ -7,8 +7,8 @@ import (
"regexp"
"strings"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var cmdAlias = &Command{

Просмотреть файл

@ -11,9 +11,9 @@ import (
"strings"
"time"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var cmdAPI = &Command{

Просмотреть файл

@ -6,8 +6,8 @@ import (
"os"
"regexp"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdApply = &Command{

Просмотреть файл

@ -4,8 +4,8 @@ import (
"fmt"
"strings"
"github.com/github/hub/cmd"
"github.com/github/hub/utils"
"github.com/github/hub/v2/cmd"
"github.com/github/hub/v2/utils"
)
type Args struct {

Просмотреть файл

@ -3,7 +3,7 @@ package commands
import (
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestNewArgs(t *testing.T) {

Просмотреть файл

@ -5,8 +5,8 @@ import (
"net/url"
"strings"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdBrowse = &Command{

Просмотреть файл

@ -4,9 +4,9 @@ import (
"fmt"
"regexp"
"github.com/github/hub/git"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdCheckout = &Command{

Просмотреть файл

@ -4,8 +4,8 @@ import (
"fmt"
"regexp"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdCherryPick = &Command{

Просмотреть файл

@ -5,10 +5,10 @@ import (
"os"
"sort"
"github.com/github/hub/git"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var cmdCiStatus = &Command{

Просмотреть файл

@ -5,8 +5,8 @@ import (
"regexp"
"strings"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdClone = &Command{

Просмотреть файл

@ -5,7 +5,7 @@ import (
"regexp"
"strings"
"github.com/github/hub/utils"
"github.com/github/hub/v2/utils"
)
var (

Просмотреть файл

@ -6,8 +6,8 @@ import (
"regexp"
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/ui"
"github.com/github/hub/v2/internal/assert"
"github.com/github/hub/v2/ui"
)
func TestMain(m *testing.M) {

Просмотреть файл

@ -6,8 +6,8 @@ import (
"regexp"
"strings"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdCompare = &Command{

Просмотреть файл

@ -1,7 +1,7 @@
package commands
import (
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
"testing"
)

Просмотреть файл

@ -4,10 +4,10 @@ import (
"fmt"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var cmdCreate = &Command{

Просмотреть файл

@ -7,9 +7,9 @@ import (
"regexp"
"strings"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var cmdDelete = &Command{

Просмотреть файл

@ -5,8 +5,8 @@ import (
"regexp"
"strings"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdFetch = &Command{

Просмотреть файл

@ -1,7 +1,7 @@
package commands
import (
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
"testing"
)

Просмотреть файл

@ -3,9 +3,9 @@ package commands
import (
"fmt"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var cmdFork = &Command{

Просмотреть файл

@ -5,9 +5,9 @@ import (
"sort"
"strings"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var (

Просмотреть файл

@ -8,9 +8,9 @@ import (
"sort"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
"github.com/kballard/go-shellquote"
)

Просмотреть файл

@ -5,8 +5,8 @@ import (
"regexp"
"strings"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdInit = &Command{

Просмотреть файл

@ -6,8 +6,8 @@ import (
"path/filepath"
"testing"
"github.com/github/hub/github"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/internal/assert"
)
func setupInitContext() {

Просмотреть файл

@ -7,10 +7,10 @@ import (
"strings"
"time"
"github.com/github/hub/git"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var (

Просмотреть файл

@ -4,7 +4,7 @@ import (
"testing"
"time"
"github.com/github/hub/github"
"github.com/github/hub/v2/github"
)
type formatIssueTest struct {

Просмотреть файл

@ -4,8 +4,8 @@ import (
"fmt"
"regexp"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdMerge = &Command{

Просмотреть файл

@ -5,10 +5,10 @@ import (
"strconv"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var (

Просмотреть файл

@ -8,9 +8,9 @@ import (
"strings"
"time"
"github.com/github/hub/git"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdPullRequest = &Command{

Просмотреть файл

@ -3,8 +3,8 @@ package commands
import (
"testing"
"github.com/github/hub/github"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/internal/assert"
)
func TestPullRequest_ParsePullRequestProject(t *testing.T) {

Просмотреть файл

@ -3,8 +3,8 @@ package commands
import (
"strings"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdPush = &Command{

Просмотреть файл

@ -1,7 +1,7 @@
package commands
import (
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
"testing"
)

Просмотреть файл

@ -8,9 +8,9 @@ import (
"strings"
"time"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var (

Просмотреть файл

@ -5,9 +5,9 @@ import (
"regexp"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdRemote = &Command{

Просмотреть файл

@ -5,9 +5,9 @@ import (
"regexp"
"testing"
"github.com/github/hub/fixtures"
"github.com/github/hub/github"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/fixtures"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/internal/assert"
)
func TestTransformRemoteArgs(t *testing.T) {

Просмотреть файл

@ -4,9 +4,9 @@ import (
"fmt"
"strings"
"github.com/github/hub/cmd"
"github.com/github/hub/git"
"github.com/github/hub/ui"
"github.com/github/hub/v2/cmd"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/ui"
"github.com/kballard/go-shellquote"
)

Просмотреть файл

@ -3,7 +3,7 @@ package commands
import (
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestRunner_splitAliasCmd(t *testing.T) {

Просмотреть файл

@ -5,10 +5,10 @@ import (
"regexp"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var cmdSync = &Command{

Просмотреть файл

@ -9,9 +9,9 @@ import (
"strings"
"github.com/atotto/clipboard"
"github.com/github/hub/git"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
type stringSliceValue []string

Просмотреть файл

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestDirIsNotEmpty(t *testing.T) {

Просмотреть файл

@ -1,8 +1,8 @@
package commands
import (
"github.com/github/hub/ui"
"github.com/github/hub/version"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/version"
)
var cmdVersion = &Command{

Просмотреть файл

@ -6,7 +6,7 @@ import (
"os"
"path/filepath"
"github.com/github/hub/cmd"
"github.com/github/hub/v2/cmd"
)
type TestRepo struct {

Просмотреть файл

@ -6,7 +6,7 @@ import (
"path/filepath"
"strings"
"github.com/github/hub/cmd"
"github.com/github/hub/v2/cmd"
)
var GlobalFlags []string

Просмотреть файл

@ -6,8 +6,8 @@ import (
"strings"
"testing"
"github.com/github/hub/fixtures"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/fixtures"
"github.com/github/hub/v2/internal/assert"
)
func TestGitDir(t *testing.T) {

Просмотреть файл

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestSSHConfigReader_Read(t *testing.T) {

Просмотреть файл

@ -3,7 +3,7 @@ package git
import (
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func createURLParser() *URLParser {

Просмотреть файл

@ -5,7 +5,7 @@ import (
"regexp"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/v2/git"
)
type Branch struct {

Просмотреть файл

@ -3,7 +3,7 @@ package github
import (
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestBranch_ShortName(t *testing.T) {

Просмотреть файл

@ -17,7 +17,7 @@ import (
"strings"
"time"
"github.com/github/hub/version"
"github.com/github/hub/v2/version"
)
const (

Просмотреть файл

@ -6,7 +6,7 @@ import (
"regexp"
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestClient_FormatError(t *testing.T) {

Просмотреть файл

@ -12,8 +12,8 @@ import (
"strings"
"syscall"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
"github.com/mitchellh/go-homedir"
"golang.org/x/crypto/ssh/terminal"
)

Просмотреть файл

@ -6,8 +6,8 @@ import (
"strings"
"testing"
"github.com/github/hub/fixtures"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/fixtures"
"github.com/github/hub/v2/internal/assert"
)
func TestConfigService_TomlLoad(t *testing.T) {

Просмотреть файл

@ -10,10 +10,10 @@ import (
"runtime"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/version"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
"github.com/github/hub/v2/version"
)
const (

Просмотреть файл

@ -3,7 +3,7 @@ package github
import (
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestStackRemoveSelfAndPanic(t *testing.T) {

Просмотреть файл

@ -10,8 +10,8 @@ import (
"regexp"
"strings"
"github.com/github/hub/cmd"
"github.com/github/hub/git"
"github.com/github/hub/v2/cmd"
"github.com/github/hub/v2/git"
"github.com/kballard/go-shellquote"
)

Просмотреть файл

@ -6,7 +6,7 @@ import (
"os"
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestEditor_openAndEdit_deleteFileWhenOpeningEditorFails(t *testing.T) {

Просмотреть файл

@ -6,7 +6,7 @@ import (
"os"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/v2/git"
)
var (

Просмотреть файл

@ -21,8 +21,8 @@ import (
"strings"
"time"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
"golang.org/x/net/http/httpproxy"
)

Просмотреть файл

@ -12,7 +12,7 @@ import (
"os"
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func setupTestServer(unixSocket string) *testServer {

Просмотреть файл

@ -5,7 +5,7 @@ import (
"net/url"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/v2/git"
)
func LocalRepo() (repo *GitHubRepo, err error) {

Просмотреть файл

@ -4,7 +4,7 @@ import (
"net/url"
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestGitHubRepo_remotesForPublish(t *testing.T) {

Просмотреть файл

@ -3,7 +3,7 @@ package github
import (
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestMessageBuilder_multiline_title(t *testing.T) {

Просмотреть файл

@ -7,8 +7,8 @@ import (
"path/filepath"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/utils"
)
type Project struct {

Просмотреть файл

@ -5,8 +5,8 @@ import (
"os"
"testing"
"github.com/github/hub/fixtures"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/fixtures"
"github.com/github/hub/v2/internal/assert"
)
func TestSameAs(t *testing.T) {

Просмотреть файл

@ -6,7 +6,7 @@ import (
"regexp"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/v2/git"
)
var (

Просмотреть файл

@ -3,8 +3,8 @@ package github
import (
"testing"
"github.com/github/hub/fixtures"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/fixtures"
"github.com/github/hub/v2/internal/assert"
)
func TestGithubRemote_NoPush(t *testing.T) {

Просмотреть файл

@ -5,7 +5,7 @@ package github
import (
"os"
"github.com/github/hub/cmd"
"github.com/github/hub/v2/cmd"
)
func setConsole(cmd *cmd.Cmd) {

Просмотреть файл

@ -2,7 +2,7 @@
package github
import "github.com/github/hub/cmd"
import "github.com/github/hub/v2/cmd"
// This does nothing on windows
func setConsole(cmd *cmd.Cmd) {

Просмотреть файл

@ -5,8 +5,8 @@ import (
"path/filepath"
"testing"
"github.com/github/hub/fixtures"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/fixtures"
"github.com/github/hub/v2/internal/assert"
)
var prContent = `Description

Просмотреть файл

@ -3,8 +3,8 @@ package github
import (
"testing"
"github.com/github/hub/fixtures"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/fixtures"
"github.com/github/hub/v2/internal/assert"
)
func TestParseURL(t *testing.T) {

Просмотреть файл

@ -1,7 +1,7 @@
package github
import (
"github.com/github/hub/git"
"github.com/github/hub/v2/git"
)
func IsHTTPSProtocol() bool {

2
go.mod
Просмотреть файл

@ -1,4 +1,4 @@
module github.com/github/hub
module github.com/github/hub/v2
go 1.11

Просмотреть файл

@ -7,9 +7,9 @@ import (
"os/exec"
"syscall"
"github.com/github/hub/commands"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/v2/commands"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
)
func main() {

Просмотреть файл

@ -11,8 +11,8 @@ import (
"strings"
"text/template"
"github.com/github/hub/md2roff"
"github.com/github/hub/utils"
"github.com/github/hub/v2/md2roff"
"github.com/github/hub/v2/utils"
"github.com/russross/blackfriday"
)

Просмотреть файл

@ -14,7 +14,7 @@ find_source_files() {
build_hub() {
mkdir -p "$(dirname "$1")"
go build \
-ldflags "-X github.com/github/hub/version.Version=`./script/version` $LDFLAGS" \
-ldflags "-X github.com/github/hub/v2/version.Version=`./script/version` $LDFLAGS" \
-gcflags "$GCFLAGS" \
-asmflags "$ASMFLAGS" \
-o "$1"

Просмотреть файл

@ -18,7 +18,7 @@ prepare() {
go tool cover -mode=set -var="LiveCoverage$((++n))" "$f" > "$f"~
sed -E '
/^package /a\
import "github.com/github/hub/coverage"
import "github.com/github/hub/v2/coverage"
s/(LiveCoverage[0-9]+)\.Count\[([0-9]+)\][^;]+/coverage.Record(\1, \2)/g
' < "$f"~ > "$f"
rm "$f"~
@ -32,7 +32,7 @@ generate() {
source_files | xargs git checkout --
echo 'mode: count' > "$HUB_COVERAGE"~
sed -E 's!^.+/(github.com/github/hub/)!\1!' "$HUB_COVERAGE" | awk '
sed -E 's!^.+/(github.com/github/hub/v2/)!\1!' "$HUB_COVERAGE" | awk '
{ a[substr($0, 0, length()-2)] += $(NF) }
END { for (k in a) print k, a[k] }
' >> "$HUB_COVERAGE"~

Просмотреть файл

@ -10,7 +10,7 @@ import (
"strings"
"time"
"github.com/github/hub/ui"
"github.com/github/hub/v2/ui"
"github.com/kballard/go-shellquote"
)

Просмотреть файл

@ -1,7 +1,7 @@
package utils
import (
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
"testing"
"time"
)