Merge pull request #4394 from cli/jg/move-codespace-api

codespace api: move `internal/api` to `internal/codespaces/api`
This commit is contained in:
Jose Garcia 2021-09-30 12:02:14 -04:00 committed by GitHub
commit ab27d1b5e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 12 additions and 12 deletions

View file

@ -13,7 +13,7 @@ import (
"github.com/AlecAivazis/survey/v2"
"github.com/AlecAivazis/survey/v2/terminal"
"github.com/cli/cli/v2/cmd/ghcs/output"
"github.com/cli/cli/v2/internal/api"
"github.com/cli/cli/v2/internal/codespaces/api"
"github.com/spf13/cobra"
"golang.org/x/term"
)

View file

@ -9,8 +9,8 @@ import (
"github.com/AlecAivazis/survey/v2"
"github.com/cli/cli/v2/cmd/ghcs/output"
"github.com/cli/cli/v2/internal/api"
"github.com/cli/cli/v2/internal/codespaces"
"github.com/cli/cli/v2/internal/codespaces/api"
"github.com/fatih/camelcase"
"github.com/spf13/cobra"
)

View file

@ -8,7 +8,7 @@ import (
"time"
"github.com/AlecAivazis/survey/v2"
"github.com/cli/cli/v2/internal/api"
"github.com/cli/cli/v2/internal/codespaces/api"
"github.com/spf13/cobra"
"golang.org/x/sync/errgroup"
)

View file

@ -12,7 +12,7 @@ import (
"github.com/MakeNowJust/heredoc"
"github.com/cli/cli/v2/cmd/ghcs/output"
"github.com/cli/cli/v2/internal/api"
"github.com/cli/cli/v2/internal/codespaces/api"
)
func TestDelete(t *testing.T) {

View file

@ -6,7 +6,7 @@ import (
"os"
"github.com/cli/cli/v2/cmd/ghcs/output"
"github.com/cli/cli/v2/internal/api"
"github.com/cli/cli/v2/internal/codespaces/api"
"github.com/spf13/cobra"
)

View file

@ -9,7 +9,7 @@ import (
"github.com/cli/cli/v2/cmd/ghcs"
"github.com/cli/cli/v2/cmd/ghcs/output"
"github.com/cli/cli/v2/internal/api"
"github.com/cli/cli/v2/internal/codespaces/api"
"github.com/spf13/cobra"
)

View file

@ -7,7 +7,7 @@ import (
"context"
"sync"
"github.com/cli/cli/v2/internal/api"
"github.com/cli/cli/v2/internal/codespaces/api"
)
// apiClientMock is a mock implementation of apiClient.

View file

@ -12,8 +12,8 @@ import (
"strings"
"github.com/cli/cli/v2/cmd/ghcs/output"
"github.com/cli/cli/v2/internal/api"
"github.com/cli/cli/v2/internal/codespaces"
"github.com/cli/cli/v2/internal/codespaces/api"
"github.com/cli/cli/v2/pkg/liveshare"
"github.com/muhammadmuzzammil1998/jsonc"
"github.com/spf13/cobra"

View file

@ -6,7 +6,7 @@ import (
"fmt"
"time"
"github.com/cli/cli/v2/internal/api"
"github.com/cli/cli/v2/internal/codespaces/api"
"github.com/cli/cli/v2/pkg/liveshare"
)

View file

@ -9,7 +9,7 @@ import (
"strings"
"time"
"github.com/cli/cli/v2/internal/api"
"github.com/cli/cli/v2/internal/codespaces/api"
"github.com/cli/cli/v2/pkg/liveshare"
)

View file

@ -7,7 +7,7 @@ import (
"github.com/MakeNowJust/heredoc"
"github.com/cli/cli/v2/cmd/ghcs"
"github.com/cli/cli/v2/cmd/ghcs/output"
ghcsApi "github.com/cli/cli/v2/internal/api"
codespacesAPI "github.com/cli/cli/v2/internal/codespaces/api"
actionsCmd "github.com/cli/cli/v2/pkg/cmd/actions"
aliasCmd "github.com/cli/cli/v2/pkg/cmd/alias"
apiCmd "github.com/cli/cli/v2/pkg/cmd/api"
@ -130,7 +130,7 @@ func bareHTTPClient(f *cmdutil.Factory, version string) func() (*http.Client, er
func newCodespaceCmd(f *cmdutil.Factory) *cobra.Command {
cmd := ghcs.NewRootCmd(ghcs.NewApp(
output.NewLogger(f.IOStreams.Out, f.IOStreams.ErrOut, !f.IOStreams.IsStdoutTTY()),
ghcsApi.New("", &lazyLoadedHTTPClient{factory: f}),
codespacesAPI.New("", &lazyLoadedHTTPClient{factory: f}),
))
cmd.Use = "codespace"
cmd.Aliases = []string{"cs"}