Skip to content

Commit

Permalink
chore: import packages only once
Browse files Browse the repository at this point in the history
Signed-off-by: guoguangwu <[email protected]>
  • Loading branch information
testwill committed May 15, 2024
1 parent a89eddd commit a734929
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
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

0 comments on commit a734929

Please sign in to comment.