Skip to content

Commit

Permalink
refactor: Fix the import lines
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 committed Jun 1, 2023
1 parent c0bb992 commit 873a981
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 873a981

Please sign in to comment.