Change to v2 import statements
This commit is contained in:
parent
78067e0a89
commit
952ebc8eb2
8 changed files with 24 additions and 24 deletions
|
|
@ -7,9 +7,9 @@ import (
|
|||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/cli/cli/internal/config"
|
||||
"github.com/cli/cli/pkg/cmdutil"
|
||||
"github.com/cli/cli/pkg/iostreams"
|
||||
"github.com/cli/cli/v2/internal/config"
|
||||
"github.com/cli/cli/v2/pkg/cmdutil"
|
||||
"github.com/cli/cli/v2/pkg/iostreams"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ import (
|
|||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/cli/cli/internal/config"
|
||||
"github.com/cli/cli/pkg/httpmock"
|
||||
"github.com/cli/cli/pkg/iostreams"
|
||||
"github.com/cli/cli/v2/internal/config"
|
||||
"github.com/cli/cli/v2/pkg/httpmock"
|
||||
"github.com/cli/cli/v2/pkg/iostreams"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
"io/ioutil"
|
||||
"net/http"
|
||||
|
||||
"github.com/cli/cli/api"
|
||||
"github.com/cli/cli/internal/ghinstance"
|
||||
"github.com/cli/cli/v2/api"
|
||||
"github.com/cli/cli/v2/internal/ghinstance"
|
||||
)
|
||||
|
||||
var scopesError = errors.New("insufficient OAuth scopes")
|
||||
|
|
@ -23,7 +23,7 @@ func GPGKeyUpload(httpClient *http.Client, hostname string, keyFile io.Reader) e
|
|||
}
|
||||
|
||||
payload := map[string]string{
|
||||
"armored_public_key": string(keyBytes),
|
||||
"armored_public_key": string(keyBytes),
|
||||
}
|
||||
|
||||
payloadBytes, err := json.Marshal(payload)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
package key
|
||||
|
||||
import (
|
||||
cmdAdd "github.com/cli/cli/pkg/cmd/gpg-key/add"
|
||||
cmdList "github.com/cli/cli/pkg/cmd/gpg-key/list"
|
||||
"github.com/cli/cli/pkg/cmdutil"
|
||||
cmdAdd "github.com/cli/cli/v2/pkg/cmd/gpg-key/add"
|
||||
cmdList "github.com/cli/cli/v2/pkg/cmd/gpg-key/list"
|
||||
"github.com/cli/cli/v2/pkg/cmdutil"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/cli/cli/api"
|
||||
"github.com/cli/cli/internal/ghinstance"
|
||||
"github.com/cli/cli/v2/api"
|
||||
"github.com/cli/cli/v2/internal/ghinstance"
|
||||
)
|
||||
|
||||
var scopesError = errors.New("insufficient OAuth scopes")
|
||||
|
|
@ -18,8 +18,7 @@ var scopesError = errors.New("insufficient OAuth scopes")
|
|||
type emails []email
|
||||
|
||||
type email struct {
|
||||
Email string `json:email`
|
||||
Verified bool `json:verified`
|
||||
Email string `json:"email"`
|
||||
}
|
||||
|
||||
func (es emails) String() string {
|
||||
|
|
@ -33,7 +32,7 @@ func (es emails) String() string {
|
|||
type gpgKey struct {
|
||||
KeyId string `json:"key_id"`
|
||||
PublicKey string `json:"public_key"`
|
||||
Emails emails `json:emails"`
|
||||
Emails emails `json:"emails"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
ExpiresAt time.Time `json:"expires_at"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/cli/cli/internal/config"
|
||||
"github.com/cli/cli/pkg/cmdutil"
|
||||
"github.com/cli/cli/pkg/iostreams"
|
||||
"github.com/cli/cli/utils"
|
||||
"github.com/cli/cli/v2/internal/config"
|
||||
"github.com/cli/cli/v2/pkg/cmdutil"
|
||||
"github.com/cli/cli/v2/pkg/iostreams"
|
||||
"github.com/cli/cli/v2/utils"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/cli/cli/internal/config"
|
||||
"github.com/cli/cli/pkg/httpmock"
|
||||
"github.com/cli/cli/pkg/iostreams"
|
||||
"github.com/cli/cli/v2/internal/config"
|
||||
"github.com/cli/cli/v2/pkg/httpmock"
|
||||
"github.com/cli/cli/v2/pkg/iostreams"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import (
|
|||
extensionCmd "github.com/cli/cli/v2/pkg/cmd/extension"
|
||||
"github.com/cli/cli/v2/pkg/cmd/factory"
|
||||
gistCmd "github.com/cli/cli/v2/pkg/cmd/gist"
|
||||
gpgKeyCmd "github.com/cli/cli/v2/pkg/cmd/gpg-key"
|
||||
issueCmd "github.com/cli/cli/v2/pkg/cmd/issue"
|
||||
prCmd "github.com/cli/cli/v2/pkg/cmd/pr"
|
||||
releaseCmd "github.com/cli/cli/v2/pkg/cmd/release"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue