Skip to content

Commit

Permalink
refactor: Fix the import lines (#150)
Browse files Browse the repository at this point in the history
Looks like there is a bug in goimports that creates multiple blocks.

There is a related bug report when used with -local, which we don't use,
but somehow observed a similar effect.
golang/go#47440

Anyway, rerunning goimports won't split the blocks. This change keeps
the import blocks as described in
https://github.com/golang/go/wiki/CodeReviewComments#imports.
  • Loading branch information
draftcode authored Jun 1, 2023
1 parent c0bb992 commit e1aa574
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 39 deletions.
5 changes: 2 additions & 3 deletions cmd/av/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ import (
"fmt"
"os"

"github.com/aviator-co/av/internal/actions"
"github.com/aviator-co/av/internal/utils/cleanup"

"emperror.dev/errors"
"github.com/aviator-co/av/internal/actions"
"github.com/aviator-co/av/internal/config"
"github.com/aviator-co/av/internal/gh"
"github.com/aviator-co/av/internal/meta"
"github.com/aviator-co/av/internal/utils/cleanup"
"github.com/aviator-co/av/internal/utils/colors"
"github.com/fatih/color"
"github.com/shurcooL/githubv4"
Expand Down
5 changes: 2 additions & 3 deletions cmd/av/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ import (
"context"
"fmt"

"github.com/aviator-co/av/internal/utils/cleanup"
"github.com/sirupsen/logrus"

"emperror.dev/errors"
"github.com/aviator-co/av/internal/config"
"github.com/aviator-co/av/internal/meta"
"github.com/aviator-co/av/internal/utils/cleanup"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)

Expand Down
7 changes: 3 additions & 4 deletions cmd/av/stack_branchcommit.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ import (
"regexp"
"strings"

"github.com/aviator-co/av/internal/actions"
"github.com/aviator-co/av/internal/utils/cleanup"
"github.com/aviator-co/av/internal/utils/colors"

"emperror.dev/errors"
"github.com/aviator-co/av/internal/actions"
"github.com/aviator-co/av/internal/git"
"github.com/aviator-co/av/internal/meta"
"github.com/aviator-co/av/internal/utils/cleanup"
"github.com/aviator-co/av/internal/utils/colors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
Expand Down
3 changes: 1 addition & 2 deletions cmd/av/stack_submit.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ package main
import (
"context"

"github.com/aviator-co/av/internal/utils/cleanup"

"emperror.dev/errors"
"github.com/aviator-co/av/internal/actions"
"github.com/aviator-co/av/internal/config"
"github.com/aviator-co/av/internal/gh"
"github.com/aviator-co/av/internal/meta"
"github.com/aviator-co/av/internal/utils/cleanup"
"github.com/shurcooL/githubv4"
"github.com/spf13/cobra"
)
Expand Down
5 changes: 2 additions & 3 deletions cmd/av/stack_tidy.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ import (
"os"
"strings"

"github.com/aviator-co/av/internal/utils/colors"
"github.com/aviator-co/av/internal/utils/textutils"

"github.com/aviator-co/av/internal/git"
"github.com/aviator-co/av/internal/meta"
"github.com/aviator-co/av/internal/utils/colors"
"github.com/aviator-co/av/internal/utils/textutils"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion e2e_tests/stack_branch_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package e2e_tests

import (
"github.com/aviator-co/av/internal/meta"
"testing"

"github.com/aviator-co/av/internal/git/gittest"
"github.com/aviator-co/av/internal/meta"
"github.com/aviator-co/av/internal/meta/jsonfiledb"
"github.com/stretchr/testify/require"
)
Expand Down
3 changes: 1 addition & 2 deletions e2e_tests/stack_sync_delete_merged_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ package e2e_tests
import (
"testing"

"github.com/aviator-co/av/internal/meta"

"github.com/aviator-co/av/internal/git"
"github.com/aviator-co/av/internal/git/gittest"
"github.com/aviator-co/av/internal/meta"
"github.com/aviator-co/av/internal/meta/jsonfiledb"
"github.com/stretchr/testify/require"
)
Expand Down
5 changes: 2 additions & 3 deletions e2e_tests/stack_sync_delete_parent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ package e2e_tests
import (
"testing"

"github.com/aviator-co/av/internal/meta"
"github.com/stretchr/testify/assert"

"github.com/aviator-co/av/internal/git"
"github.com/aviator-co/av/internal/git/gittest"
"github.com/aviator-co/av/internal/meta"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

Expand Down
5 changes: 2 additions & 3 deletions e2e_tests/stack_sync_merge_commit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ package e2e_tests
import (
"testing"

"github.com/aviator-co/av/internal/meta"
"github.com/stretchr/testify/assert"

"github.com/aviator-co/av/internal/git"
"github.com/aviator-co/av/internal/git/gittest"
"github.com/aviator-co/av/internal/meta"
"github.com/aviator-co/av/internal/meta/jsonfiledb"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

Expand Down
5 changes: 2 additions & 3 deletions e2e_tests/stack_sync_merged_parent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ package e2e_tests
import (
"testing"

"github.com/aviator-co/av/internal/meta"
"github.com/stretchr/testify/assert"

"github.com/aviator-co/av/internal/git"
"github.com/aviator-co/av/internal/git/gittest"
"github.com/aviator-co/av/internal/meta"
"github.com/aviator-co/av/internal/meta/jsonfiledb"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

Expand Down
10 changes: 4 additions & 6 deletions internal/actions/pr.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,17 @@ import (
"strings"
"text/template"

"github.com/aviator-co/av/internal/utils/sanitize"

"github.com/aviator-co/av/internal/editor"
"github.com/aviator-co/av/internal/utils/stringutils"
"github.com/aviator-co/av/internal/utils/templateutils"

"emperror.dev/errors"
"github.com/aviator-co/av/internal/config"
"github.com/aviator-co/av/internal/editor"
"github.com/aviator-co/av/internal/gh"
"github.com/aviator-co/av/internal/git"
"github.com/aviator-co/av/internal/meta"
"github.com/aviator-co/av/internal/utils/browser"
"github.com/aviator-co/av/internal/utils/colors"
"github.com/aviator-co/av/internal/utils/sanitize"
"github.com/aviator-co/av/internal/utils/stringutils"
"github.com/aviator-co/av/internal/utils/templateutils"
"github.com/fatih/color"
"github.com/shurcooL/githubv4"
"github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion internal/meta/branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package meta

import (
"encoding/json"
"golang.org/x/exp/slices"

"emperror.dev/errors"
"github.com/shurcooL/githubv4"
"github.com/sirupsen/logrus"
"golang.org/x/exp/slices"
)

type Branch struct {
Expand Down
3 changes: 1 addition & 2 deletions internal/reorder/cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import (
"fmt"
"io"

"github.com/aviator-co/av/internal/meta"

"github.com/aviator-co/av/internal/git"
"github.com/aviator-co/av/internal/meta"
)

// Context is the context of a reorder operation.
Expand Down
3 changes: 1 addition & 2 deletions internal/reorder/pick_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import (
"bytes"
"testing"

"github.com/aviator-co/av/internal/meta/jsonfiledb"

"github.com/aviator-co/av/internal/git"
"github.com/aviator-co/av/internal/git/gittest"
"github.com/aviator-co/av/internal/meta/jsonfiledb"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
1 change: 0 additions & 1 deletion internal/reorder/stackbranch.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (

"github.com/aviator-co/av/internal/git"
"github.com/aviator-co/av/internal/meta"

"github.com/spf13/pflag"
)

Expand Down

0 comments on commit e1aa574

Please sign in to comment.