Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: import packages only once #1185

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions pkg/cmd/logs/tail.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"github.com/stripe/stripe-cli/pkg/ansi"
"github.com/stripe/stripe-cli/pkg/config"
"github.com/stripe/stripe-cli/pkg/logtailing"
logTailing "github.com/stripe/stripe-cli/pkg/logtailing"
"github.com/stripe/stripe-cli/pkg/stripe"
"github.com/stripe/stripe-cli/pkg/validators"
"github.com/stripe/stripe-cli/pkg/version"
Expand All @@ -34,15 +33,15 @@ type TailCmd struct {
cfg *config.Config
Cmd *cobra.Command
format string
LogFilters *logTailing.LogFilters
LogFilters *logtailing.LogFilters
noWSS bool
}

// NewTailCmd creates and initializes the tail command for the logs package
func NewTailCmd(config *config.Config) *TailCmd {
tailCmd := &TailCmd{
cfg: config,
LogFilters: &logTailing.LogFilters{},
LogFilters: &logtailing.LogFilters{},
}

tailCmd.Cmd = &cobra.Command{
Expand Down Expand Up @@ -178,7 +177,7 @@ func (tailCmd *TailCmd) runTailCmd(cmd *cobra.Command, args []string) error {

logtailingOutCh := make(chan websocket.IElement)

tailer := logTailing.New(&logTailing.Config{
tailer := logtailing.New(&logtailing.Config{
Client: &stripe.Client{
APIKey: key,
BaseURL: apiBase,
Expand Down
3 changes: 1 addition & 2 deletions pkg/samples/samples.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
log "github.com/sirupsen/logrus"

"github.com/stripe/stripe-cli/pkg/config"
g "github.com/stripe/stripe-cli/pkg/git"
gitpkg "github.com/stripe/stripe-cli/pkg/git"
"github.com/stripe/stripe-cli/pkg/stripe"
"github.com/stripe/stripe-cli/pkg/stripeauth"
Expand Down Expand Up @@ -112,7 +111,7 @@ type SampleManager struct {
// Filesystem operations
Fs afero.Fs
// Git operations.
Git g.Interface
Git gitpkg.Interface

Config *config.Config

Expand Down