Merge pull request #4394 from cli/jg/move-codespace-api
codespace api: move `internal/api` to `internal/codespaces/api`
This commit is contained in:
commit
ab27d1b5e1
13 changed files with 12 additions and 12 deletions
|
|
@ -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"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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"}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue