Skip to content

Commit

Permalink
update go modules to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoisaiah committed Nov 6, 2024
1 parent 9fcba3a commit cbca5b2
Show file tree
Hide file tree
Showing 40 changed files with 120 additions and 120 deletions.
6 changes: 3 additions & 3 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"github.com/pterm/pterm"
"github.com/urfave/cli/v2"

"github.com/ayoisaiah/f2/internal/config"
"github.com/ayoisaiah/f2/internal/osutil"
"github.com/ayoisaiah/f2/report"
"github.com/ayoisaiah/f2/v2/internal/config"
"github.com/ayoisaiah/f2/v2/internal/osutil"
"github.com/ayoisaiah/f2/v2/report"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions app/app_test/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

"github.com/urfave/cli/v2"

"github.com/ayoisaiah/f2/app"
"github.com/ayoisaiah/f2/internal/config"
"github.com/ayoisaiah/f2/internal/testutil"
"github.com/ayoisaiah/f2/v2/app"
"github.com/ayoisaiah/f2/v2/internal/config"
"github.com/ayoisaiah/f2/v2/internal/testutil"
)

func TestShortHelp(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion app/app_test/app_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/ayoisaiah/f2/app"
"github.com/ayoisaiah/f2/v2/app"
)

func simulatePipe(t *testing.T, name string, arg ...string) *exec.Cmd {
Expand Down
2 changes: 1 addition & 1 deletion app/errors.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package app

import (
"github.com/ayoisaiah/f2/internal/apperr"
"github.com/ayoisaiah/f2/v2/internal/apperr"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions cmd/f2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"os"

"github.com/ayoisaiah/f2"
"github.com/ayoisaiah/f2/report"
"github.com/ayoisaiah/f2/v2"
"github.com/ayoisaiah/f2/v2/report"
)

func main() {
Expand Down
16 changes: 8 additions & 8 deletions f2.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import (

"github.com/urfave/cli/v2"

"github.com/ayoisaiah/f2/app"
"github.com/ayoisaiah/f2/find"
"github.com/ayoisaiah/f2/internal/apperr"
"github.com/ayoisaiah/f2/internal/config"
"github.com/ayoisaiah/f2/rename"
"github.com/ayoisaiah/f2/replace"
"github.com/ayoisaiah/f2/report"
"github.com/ayoisaiah/f2/validate"
"github.com/ayoisaiah/f2/v2/app"
"github.com/ayoisaiah/f2/v2/find"
"github.com/ayoisaiah/f2/v2/internal/apperr"
"github.com/ayoisaiah/f2/v2/internal/config"
"github.com/ayoisaiah/f2/v2/rename"
"github.com/ayoisaiah/f2/v2/replace"
"github.com/ayoisaiah/f2/v2/report"
"github.com/ayoisaiah/f2/v2/validate"
)

var errConflictDetected = &apperr.Error{
Expand Down
6 changes: 3 additions & 3 deletions f2_test/f2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"bytes"
"testing"

"github.com/ayoisaiah/f2"
"github.com/ayoisaiah/f2/internal/config"
"github.com/ayoisaiah/f2/internal/testutil"
"github.com/ayoisaiah/f2/v2"
"github.com/ayoisaiah/f2/v2/internal/config"
"github.com/ayoisaiah/f2/v2/internal/testutil"
)

func TestImagePairRenaming(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions find/csv.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"path/filepath"
"strings"

"github.com/ayoisaiah/f2/internal/config"
"github.com/ayoisaiah/f2/internal/file"
"github.com/ayoisaiah/f2/report"
"github.com/ayoisaiah/f2/v2/internal/config"
"github.com/ayoisaiah/f2/v2/internal/file"
"github.com/ayoisaiah/f2/v2/report"
)

// readCSVFile reads all the records contained in a CSV file specified by
Expand Down
14 changes: 7 additions & 7 deletions find/find.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import (

"github.com/araddon/dateparse"

"github.com/ayoisaiah/f2/internal/config"
"github.com/ayoisaiah/f2/internal/file"
"github.com/ayoisaiah/f2/internal/osutil"
"github.com/ayoisaiah/f2/internal/pathutil"
"github.com/ayoisaiah/f2/internal/sortfiles"
"github.com/ayoisaiah/f2/internal/status"
"github.com/ayoisaiah/f2/replace/variables"
"github.com/ayoisaiah/f2/v2/internal/config"
"github.com/ayoisaiah/f2/v2/internal/file"
"github.com/ayoisaiah/f2/v2/internal/osutil"
"github.com/ayoisaiah/f2/v2/internal/pathutil"
"github.com/ayoisaiah/f2/v2/internal/sortfiles"
"github.com/ayoisaiah/f2/v2/internal/status"
"github.com/ayoisaiah/f2/v2/replace/variables"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion find/find_test/find_csv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package find_test
import (
"testing"

"github.com/ayoisaiah/f2/internal/testutil"
"github.com/ayoisaiah/f2/v2/internal/testutil"
)

var csvCases = []testutil.TestCase{
Expand Down
4 changes: 2 additions & 2 deletions find/find_test/find_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
"testing"

"github.com/ayoisaiah/f2/find"
"github.com/ayoisaiah/f2/internal/testutil"
"github.com/ayoisaiah/f2/v2/find"
"github.com/ayoisaiah/f2/v2/internal/testutil"
)

var findFileSystem = []string{
Expand Down
2 changes: 1 addition & 1 deletion find/find_test/find_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package find_test
import (
"testing"

"github.com/ayoisaiah/f2/internal/testutil"
"github.com/ayoisaiah/f2/v2/internal/testutil"
)

func setupWindowsHidden(_ *testing.T, _ string) (teardown func()) {
Expand Down
2 changes: 1 addition & 1 deletion find/find_test/find_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"syscall"
"testing"

"github.com/ayoisaiah/f2/internal/testutil"
"github.com/ayoisaiah/f2/v2/internal/testutil"
)

func setHidden(path string) error {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/ayoisaiah/f2
module github.com/ayoisaiah/f2/v2

go 1.23

Expand Down
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/pterm/pterm"
"github.com/urfave/cli/v2"

"github.com/ayoisaiah/f2/internal/file"
"github.com/ayoisaiah/f2/v2/internal/file"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/config/errors.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package config

import "github.com/ayoisaiah/f2/internal/apperr"
import "github.com/ayoisaiah/f2/v2/internal/apperr"

var (
errInvalidArgument = &apperr.Error{
Expand Down
2 changes: 1 addition & 1 deletion internal/config/sort.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package config
import (
"strings"

"github.com/ayoisaiah/f2/internal/timeutil"
"github.com/ayoisaiah/f2/v2/internal/timeutil"
)

type Sort int
Expand Down
2 changes: 1 addition & 1 deletion internal/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/olekukonko/tablewriter"
"github.com/pterm/pterm"

"github.com/ayoisaiah/f2/internal/status"
"github.com/ayoisaiah/f2/v2/internal/status"
)

// Change represents a single renaming change.
Expand Down
4 changes: 2 additions & 2 deletions internal/sortfiles/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"slices"
"strings"

"github.com/ayoisaiah/f2/internal/config"
"github.com/ayoisaiah/f2/internal/file"
"github.com/ayoisaiah/f2/v2/internal/config"
"github.com/ayoisaiah/f2/v2/internal/file"
)

// ByTimeVar sorts changes by user-specified time variable.
Expand Down
6 changes: 3 additions & 3 deletions internal/sortfiles/sortfiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
"github.com/MagicalTux/natsort"
"github.com/pterm/pterm"

"github.com/ayoisaiah/f2/internal/config"
"github.com/ayoisaiah/f2/internal/file"
"github.com/ayoisaiah/f2/internal/pathutil"
"github.com/ayoisaiah/f2/v2/internal/config"
"github.com/ayoisaiah/f2/v2/internal/file"
"github.com/ayoisaiah/f2/v2/internal/pathutil"
)

func isPair(prev, curr *file.Change) bool {
Expand Down
10 changes: 5 additions & 5 deletions internal/sortfiles/sortfiles_test/sortfiles_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"testing"
"time"

"github.com/ayoisaiah/f2/internal/config"
"github.com/ayoisaiah/f2/internal/file"
"github.com/ayoisaiah/f2/internal/osutil"
"github.com/ayoisaiah/f2/internal/sortfiles"
"github.com/ayoisaiah/f2/internal/testutil"
"github.com/ayoisaiah/f2/v2/internal/config"
"github.com/ayoisaiah/f2/v2/internal/file"
"github.com/ayoisaiah/f2/v2/internal/osutil"
"github.com/ayoisaiah/f2/v2/internal/sortfiles"
"github.com/ayoisaiah/f2/v2/internal/testutil"
)

type sortTestCase struct {
Expand Down
10 changes: 5 additions & 5 deletions internal/testutil/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import (
"github.com/stretchr/testify/assert"
"github.com/urfave/cli/v2"

"github.com/ayoisaiah/f2/app"
"github.com/ayoisaiah/f2/internal/config"
"github.com/ayoisaiah/f2/internal/file"
"github.com/ayoisaiah/f2/internal/osutil"
"github.com/ayoisaiah/f2/internal/status"
"github.com/ayoisaiah/f2/v2/app"
"github.com/ayoisaiah/f2/v2/internal/config"
"github.com/ayoisaiah/f2/v2/internal/file"
"github.com/ayoisaiah/f2/v2/internal/osutil"
"github.com/ayoisaiah/f2/v2/internal/status"
)

// TestCase represents a unique test case.
Expand Down
6 changes: 3 additions & 3 deletions rename/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"os"
"path/filepath"

"github.com/ayoisaiah/f2/internal/config"
"github.com/ayoisaiah/f2/internal/file"
"github.com/ayoisaiah/f2/internal/osutil"
"github.com/ayoisaiah/f2/v2/internal/config"
"github.com/ayoisaiah/f2/v2/internal/file"
"github.com/ayoisaiah/f2/v2/internal/osutil"
)

func createBackupFile(fileName string) (io.Writer, error) {
Expand Down
12 changes: 6 additions & 6 deletions rename/rename.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"strings"
"time"

"github.com/ayoisaiah/f2/internal/apperr"
"github.com/ayoisaiah/f2/internal/config"
"github.com/ayoisaiah/f2/internal/file"
"github.com/ayoisaiah/f2/internal/osutil"
"github.com/ayoisaiah/f2/internal/status"
"github.com/ayoisaiah/f2/report"
"github.com/ayoisaiah/f2/v2/internal/apperr"
"github.com/ayoisaiah/f2/v2/internal/config"
"github.com/ayoisaiah/f2/v2/internal/file"
"github.com/ayoisaiah/f2/v2/internal/osutil"
"github.com/ayoisaiah/f2/v2/internal/status"
"github.com/ayoisaiah/f2/v2/report"
)

var errRenameFailed = &apperr.Error{
Expand Down
8 changes: 4 additions & 4 deletions rename/rename_test/rename_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"path/filepath"
"testing"

"github.com/ayoisaiah/f2/internal/config"
"github.com/ayoisaiah/f2/internal/file"
"github.com/ayoisaiah/f2/internal/testutil"
"github.com/ayoisaiah/f2/rename"
"github.com/ayoisaiah/f2/v2/internal/config"
"github.com/ayoisaiah/f2/v2/internal/file"
"github.com/ayoisaiah/f2/v2/internal/testutil"
"github.com/ayoisaiah/f2/v2/rename"
)

func renameTest(t *testing.T, cases []testutil.TestCase) {
Expand Down
4 changes: 2 additions & 2 deletions rename/rename_test/rename_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package rename_test
import (
"testing"

"github.com/ayoisaiah/f2/internal/file"
"github.com/ayoisaiah/f2/internal/testutil"
"github.com/ayoisaiah/f2/v2/internal/file"
"github.com/ayoisaiah/f2/v2/internal/testutil"
)

func TestRenameWindows(t *testing.T) {
Expand Down
12 changes: 6 additions & 6 deletions replace/replace.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"path/filepath"
"strings"

"github.com/ayoisaiah/f2/internal/config"
"github.com/ayoisaiah/f2/internal/file"
"github.com/ayoisaiah/f2/internal/pathutil"
"github.com/ayoisaiah/f2/internal/sortfiles"
"github.com/ayoisaiah/f2/internal/status"
"github.com/ayoisaiah/f2/replace/variables"
"github.com/ayoisaiah/f2/v2/internal/config"
"github.com/ayoisaiah/f2/v2/internal/file"
"github.com/ayoisaiah/f2/v2/internal/pathutil"
"github.com/ayoisaiah/f2/v2/internal/sortfiles"
"github.com/ayoisaiah/f2/v2/internal/status"
"github.com/ayoisaiah/f2/v2/replace/variables"
)

// replaceString replaces all matches in the filename
Expand Down
4 changes: 2 additions & 2 deletions replace/replace_test/indexing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package replace_test
import (
"testing"

"github.com/ayoisaiah/f2/internal/file"
"github.com/ayoisaiah/f2/internal/testutil"
"github.com/ayoisaiah/f2/v2/internal/file"
"github.com/ayoisaiah/f2/v2/internal/testutil"
)

func TestIndexing(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions replace/replace_test/replace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"strings"
"testing"

"github.com/ayoisaiah/f2/internal/file"
"github.com/ayoisaiah/f2/internal/sortfiles"
"github.com/ayoisaiah/f2/internal/testutil"
"github.com/ayoisaiah/f2/replace"
"github.com/ayoisaiah/f2/v2/internal/file"
"github.com/ayoisaiah/f2/v2/internal/sortfiles"
"github.com/ayoisaiah/f2/v2/internal/testutil"
"github.com/ayoisaiah/f2/v2/replace"
)

func replaceTest(t *testing.T, cases []testutil.TestCase) {
Expand Down
4 changes: 2 additions & 2 deletions replace/replace_test/variables_darwin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package replace_test
import (
"testing"

"github.com/ayoisaiah/f2/internal/file"
"github.com/ayoisaiah/f2/internal/testutil"
"github.com/ayoisaiah/f2/v2/internal/file"
"github.com/ayoisaiah/f2/v2/internal/testutil"
)

func TestMacOSTransforms(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions replace/replace_test/variables_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"testing"
"time"

"github.com/ayoisaiah/f2/internal/file"
"github.com/ayoisaiah/f2/internal/testutil"
"github.com/ayoisaiah/f2/v2/internal/file"
"github.com/ayoisaiah/f2/v2/internal/testutil"
)

// func getCurrentDate() string {
Expand Down
4 changes: 2 additions & 2 deletions replace/replace_test/variables_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package replace_test
import (
"testing"

"github.com/ayoisaiah/f2/internal/file"
"github.com/ayoisaiah/f2/internal/testutil"
"github.com/ayoisaiah/f2/v2/internal/file"
"github.com/ayoisaiah/f2/v2/internal/testutil"
)

func TestWindowsTransforms(t *testing.T) {
Expand Down
Loading

0 comments on commit cbca5b2

Please sign in to comment.