Skip to content

Commit

Permalink
⬆️ Reorder imports and update dependencies
Browse files Browse the repository at this point in the history
Reorder imports to move project dependencies above general
dependencies.

Modules were upgraded as part of this change.
  • Loading branch information
mikelorant committed Feb 20, 2023
1 parent cb43d6c commit f43c889
Show file tree
Hide file tree
Showing 68 changed files with 148 additions and 83 deletions.
1 change: 1 addition & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ tasks:
desc: Format Go files.
cmds:
- gofumpt -l -w .
- goimports-reviser -rm-unused -format -imports-order=std,project,general,company ./...

release:
desc: Build release version.
Expand Down
1 change: 1 addition & 0 deletions cmd/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"

"github.com/mikelorant/committed/internal/hook"

"github.com/spf13/cobra"
)

Expand Down
3 changes: 2 additions & 1 deletion cmd/hook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (
"strings"
"testing"

"github.com/hexops/autogold/v2"
"github.com/mikelorant/committed/cmd"
"github.com/mikelorant/committed/internal/hook"

"github.com/hexops/autogold/v2"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/stretchr/testify/assert"
Expand Down
5 changes: 3 additions & 2 deletions cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import (
"io"
"strings"

"github.com/charmbracelet/lipgloss"
tint "github.com/lrstanley/bubbletint"
"github.com/mikelorant/committed/internal/config"
"github.com/mikelorant/committed/internal/emoji"
"github.com/mikelorant/committed/internal/theme"

"github.com/charmbracelet/lipgloss"
tint "github.com/lrstanley/bubbletint"
"github.com/rodaine/table"
"github.com/spf13/cobra"
)
Expand Down
3 changes: 2 additions & 1 deletion cmd/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"bytes"
"testing"

"github.com/hexops/autogold/v2"
"github.com/mikelorant/committed/cmd"

"github.com/hexops/autogold/v2"
)

func TestListCmd(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import (
"log"
"os"

"github.com/go-git/go-git/v5"
cc "github.com/ivanpirog/coloredcobra"
"github.com/mikelorant/committed/internal/commit"
"github.com/mikelorant/committed/internal/hook"
"github.com/mikelorant/committed/internal/ui"

"github.com/go-git/go-git/v5"
cc "github.com/ivanpirog/coloredcobra"
"github.com/spf13/cobra"
)

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

"github.com/mikelorant/committed/cmd"
"github.com/mikelorant/committed/internal/commit"

"github.com/acarl005/stripansi"
"github.com/go-git/go-git/v5"
"github.com/hexops/autogold/v2"
"github.com/mikelorant/committed/cmd"
"github.com/mikelorant/committed/internal/commit"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/stretchr/testify/assert"
Expand Down
3 changes: 2 additions & 1 deletion cmd/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"bytes"
"testing"

"github.com/hexops/autogold/v2"
"github.com/mikelorant/committed/cmd"

"github.com/hexops/autogold/v2"
)

func TestNewVersionCmd(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ require (
github.com/lrstanley/bubbletint v0.0.0-20221222153826-8c18bc6ecfd0
github.com/mattn/go-runewidth v0.0.14
github.com/muesli/gamut v0.3.1
github.com/muesli/reflow v0.3.0
github.com/muesli/termenv v0.14.0
github.com/rodaine/table v1.1.0
github.com/spf13/cobra v1.6.1
Expand All @@ -36,7 +37,7 @@ replace (

require (
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230201104953-d1d05f4e2bfb // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
github.com/atotto/clipboard v0.1.4 // indirect
github.com/aymanbagabas/go-osc52 v1.2.1 // indirect
Expand All @@ -63,7 +64,6 @@ require (
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/muesli/clusters v0.0.0-20200529215643-2700303c1762 // indirect
github.com/muesli/kmeans v0.3.1 // indirect
github.com/muesli/reflow v0.3.0 // indirect
github.com/nightlyone/lockfile v1.0.0 // indirect
github.com/pjbgf/sha1cd v0.2.3 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
Expand All @@ -76,12 +76,12 @@ require (
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
golang.org/x/crypto v0.6.0 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/net v0.6.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/term v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/tools v0.5.0 // indirect
golang.org/x/tools v0.6.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v
github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg=
github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE=
github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4/go.mod h1:UBYPn8k0D56RtnR8RFQMjmh4KrZzWJ5o7Z9SYjossQ8=
github.com/ProtonMail/go-crypto v0.0.0-20230201104953-d1d05f4e2bfb h1:Vx1Bw/nGULx+FuY7Sw+8ZDpOx9XOdA+mOfo678SqkbU=
github.com/ProtonMail/go-crypto v0.0.0-20230201104953-d1d05f4e2bfb/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g=
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA=
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g=
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8=
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo=
github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk=
Expand Down Expand Up @@ -223,8 +223,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down Expand Up @@ -276,8 +276,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ=
golang.org/x/tools v0.5.0 h1:+bSpV5HIeWkuvgaMfI3UmKRThoTA5ODJTUd8T17NO+4=
golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k=
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
1 change: 1 addition & 0 deletions internal/commit/file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"testing"

"github.com/mikelorant/committed/internal/commit"

"github.com/stretchr/testify/assert"
)

Expand Down
3 changes: 2 additions & 1 deletion internal/commit/transform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"path/filepath"
"testing"

"github.com/hexops/autogold/v2"
"github.com/mikelorant/committed/internal/commit"
"github.com/mikelorant/committed/internal/emoji"
"github.com/mikelorant/committed/internal/repository"

"github.com/hexops/autogold/v2"
"github.com/stretchr/testify/assert"
)

Expand Down
1 change: 1 addition & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"io"

"github.com/mikelorant/committed/internal/repository"

"gopkg.in/yaml.v3"
)

Expand Down
3 changes: 2 additions & 1 deletion internal/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import (
"strings"
"testing"

"github.com/MakeNowJust/heredoc/v2"
"github.com/mikelorant/committed/internal/config"
"github.com/mikelorant/committed/internal/repository"

"github.com/MakeNowJust/heredoc/v2"
"github.com/stretchr/testify/assert"
"gopkg.in/yaml.v3"
)
Expand Down
1 change: 1 addition & 0 deletions internal/config/emoji_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"testing"

"github.com/mikelorant/committed/internal/config"

"github.com/stretchr/testify/assert"
"gopkg.in/yaml.v3"
)
Expand Down
1 change: 1 addition & 0 deletions internal/config/visual_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"testing"

"github.com/mikelorant/committed/internal/config"

"github.com/stretchr/testify/assert"
"gopkg.in/yaml.v3"
)
Expand Down
1 change: 1 addition & 0 deletions internal/emoji/emoji_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"testing"

"github.com/mikelorant/committed/internal/emoji"

"github.com/stretchr/testify/assert"
)

Expand Down
1 change: 1 addition & 0 deletions internal/fuzzy/fuzzy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"testing"

"github.com/mikelorant/committed/internal/fuzzy"

"github.com/stretchr/testify/assert"
)

Expand Down
1 change: 1 addition & 0 deletions internal/hook/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"testing"

"github.com/mikelorant/committed/internal/hook"

"github.com/stretchr/testify/assert"
)

Expand Down
1 change: 1 addition & 0 deletions internal/hook/locate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"

"github.com/mikelorant/committed/internal/hook"

"github.com/stretchr/testify/assert"
)

Expand Down
1 change: 1 addition & 0 deletions internal/hook/uninstall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"

"github.com/mikelorant/committed/internal/hook"

"github.com/stretchr/testify/assert"
)

Expand Down
3 changes: 2 additions & 1 deletion internal/repository/branch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"testing"
"time"

"github.com/mikelorant/committed/internal/repository"

"github.com/go-git/go-billy/v5/memfs"
fixtures "github.com/go-git/go-git-fixtures/v4"
"github.com/go-git/go-git/v5"
Expand All @@ -15,7 +17,6 @@ import (
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/go-git/go-git/v5/plumbing/storer"
"github.com/go-git/go-git/v5/storage/filesystem"
"github.com/mikelorant/committed/internal/repository"
"github.com/stretchr/testify/assert"
)

Expand Down
1 change: 1 addition & 0 deletions internal/repository/commit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"testing"

"github.com/mikelorant/committed/internal/repository"

"github.com/stretchr/testify/assert"
)

Expand Down
3 changes: 2 additions & 1 deletion internal/repository/head_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (
"testing"
"time"

"github.com/mikelorant/committed/internal/repository"

"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/mikelorant/committed/internal/repository"
"github.com/stretchr/testify/assert"
)

Expand Down
3 changes: 2 additions & 1 deletion internal/repository/remote_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package repository_test
import (
"testing"

"github.com/mikelorant/committed/internal/repository"

"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/config"
"github.com/go-git/go-git/v5/storage/memory"
"github.com/mikelorant/committed/internal/repository"
"github.com/stretchr/testify/assert"
)

Expand Down
3 changes: 2 additions & 1 deletion internal/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import (
"io"
"os"

"github.com/mikelorant/committed/internal/shell"

"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/config"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/go-git/go-git/v5/plumbing/storer"
"github.com/mikelorant/committed/internal/shell"
)

type Configer interface {
Expand Down
3 changes: 2 additions & 1 deletion internal/repository/repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"errors"
"testing"

"github.com/mikelorant/committed/internal/repository"

fixtures "github.com/go-git/go-git-fixtures/v4"
"github.com/go-git/go-git/v5"
"github.com/mikelorant/committed/internal/repository"
"github.com/stretchr/testify/assert"
)

Expand Down
3 changes: 2 additions & 1 deletion internal/repository/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"errors"
"testing"

"github.com/go-git/go-git/v5/config"
"github.com/mikelorant/committed/internal/repository"

"github.com/go-git/go-git/v5/config"
"github.com/stretchr/testify/assert"
)

Expand Down
3 changes: 2 additions & 1 deletion internal/repository/worktree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import (
"errors"
"testing"

"github.com/mikelorant/committed/internal/repository"

"github.com/go-git/go-billy/v5/memfs"
fixtures "github.com/go-git/go-git-fixtures/v4"
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing/cache"
"github.com/go-git/go-git/v5/storage/filesystem"
"github.com/mikelorant/committed/internal/repository"
"github.com/stretchr/testify/assert"
)

Expand Down
1 change: 1 addition & 0 deletions internal/shell/shell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"testing"

"github.com/mikelorant/committed/internal/shell"

"github.com/stretchr/testify/assert"
)

Expand Down
1 change: 1 addition & 0 deletions internal/snapshot/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"io"

"github.com/mikelorant/committed/internal/repository"

"gopkg.in/yaml.v3"
)

Expand Down
3 changes: 2 additions & 1 deletion internal/snapshot/snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import (
"strings"
"testing"

"github.com/MakeNowJust/heredoc/v2"
"github.com/mikelorant/committed/internal/repository"
"github.com/mikelorant/committed/internal/snapshot"

"github.com/MakeNowJust/heredoc/v2"
"github.com/stretchr/testify/assert"
)

Expand Down
Loading

0 comments on commit f43c889

Please sign in to comment.