Skip to content

Commit

Permalink
Merge pull request #118 from maximilien/chore/move-project-package
Browse files Browse the repository at this point in the history
refactor(#1): moved source files into separate folder
  • Loading branch information
maximilien authored Nov 27, 2023
2 parents 26f7822 + 551b856 commit 74bbc47
Show file tree
Hide file tree
Showing 28 changed files with 23 additions and 26 deletions.
2 changes: 1 addition & 1 deletion bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
go fmt ./...

echo -e "\n Integration Testing packages:"
go test ./integration/... -parallel 4 $@
go test -count=1 ./integration/... -parallel 4 $@
)
2 changes: 1 addition & 1 deletion examples/demo1-i18n/i18n_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/pivotal-cf-experimental/jibber_jabber"

goi18n "github.com/maximilien/i18n4go/i18n"
goi18n "github.com/maximilien/i18n4go/i18n4go/i18n"
)

type Detector interface {
Expand Down
2 changes: 1 addition & 1 deletion examples/i18n_init/cf_cli_i18n_init.go.template
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/pivotal-cf-experimental/jibber_jabber"

goi18n "github.com/maximilien/i18n4go/i18n"
goi18n "github.com/maximilien/i18n4go/i18n4go/i18n"
)

type Detector interface {
Expand Down
2 changes: 1 addition & 1 deletion cmds/checkup.go → i18n4go/cmds/checkup.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (

"github.com/spf13/cobra"

"github.com/maximilien/i18n4go/common"
"github.com/maximilien/i18n4go/i18n4go/common"
)

type Checkup struct {
Expand Down
2 changes: 1 addition & 1 deletion cmds/cmd_interface.go → i18n4go/cmds/cmd_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package cmds

import (
"github.com/maximilien/i18n4go/common"
"github.com/maximilien/i18n4go/i18n4go/common"
)

type CommandInterface interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

"github.com/spf13/cobra"

"github.com/maximilien/i18n4go/common"
"github.com/maximilien/i18n4go/i18n4go/common"
)

type createTranslations struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (

"github.com/spf13/cobra"

"github.com/maximilien/i18n4go/common"
"github.com/maximilien/i18n4go/i18n4go/common"
)

type extractStrings struct {
Expand Down
3 changes: 1 addition & 2 deletions cmds/fixup.go → i18n4go/cmds/fixup.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ import (
"go/parser"
"go/token"

"github.com/maximilien/i18n4go/i18n4go/common"
"github.com/spf13/cobra"

"github.com/maximilien/i18n4go/common"
)

type fixup struct {
Expand Down
3 changes: 1 addition & 2 deletions cmds/merge_string.go → i18n4go/cmds/merge_string.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ import (
"sort"
"strings"

"github.com/maximilien/i18n4go/i18n4go/common"
"github.com/spf13/cobra"

"github.com/maximilien/i18n4go/common"
)

type mergeStrings struct {
Expand Down
4 changes: 2 additions & 2 deletions cmds/rewrite_package.go → i18n4go/cmds/rewrite_package.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"go/token"
"io/ioutil"

"github.com/maximilien/i18n4go/common"
"github.com/maximilien/i18n4go/i18n4go/common"

"github.com/spf13/cobra"

Expand All @@ -42,7 +42,7 @@ const (
import (
"path/filepath"
i18n "github.com/maximilien/i18n4go/i18n"
i18n "github.com/maximilien/i18n4go/i18n4go/i18n"
)
var T i18n.TranslateFunc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

"github.com/spf13/cobra"

"github.com/maximilien/i18n4go/common"
"github.com/maximilien/i18n4go/i18n4go/common"
)

type showMissingStrings struct {
Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions cmds/verify_strings.go → i18n4go/cmds/verify_strings.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ import (
"path/filepath"
"strings"

"github.com/maximilien/i18n4go/i18n4go/common"
"github.com/spf13/cobra"

"github.com/maximilien/i18n4go/common"
)

type verifyStrings struct {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions i18n4go/i18n4go.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (

"runtime/debug"

"github.com/maximilien/i18n4go/cmds"
"github.com/maximilien/i18n4go/common"
"github.com/maximilien/i18n4go/i18n4go/cmds"
"github.com/maximilien/i18n4go/i18n4go/common"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion integration/extract_strings/s_option_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"os"
"path/filepath"

"github.com/maximilien/i18n4go/common"
"github.com/maximilien/i18n4go/i18n4go/common"
. "github.com/maximilien/i18n4go/integration/test_helpers"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion integration/fixup/fixup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"path/filepath"
"strings"

"github.com/maximilien/i18n4go/common"
"github.com/maximilien/i18n4go/i18n4go/common"

. "github.com/maximilien/i18n4go/integration/test_helpers"
. "github.com/onsi/ginkgo"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ var _ = Describe("rewrite-package [...] --init-code-snippet-filename some-file",
Ω(session.ExitCode()).Should(Equal(0))
})

It("rewrites the source go file wrapping strings with T() and generates a i18n_init.go using teamplate file", func() {
It("rewrites the source go file wrapping strings with T() and generates a i18n_init.go using template file", func() {
expectedOutputFile := filepath.Join(expectedFilesPath, "issue14.go")
bytes, err := ioutil.ReadFile(expectedOutputFile)
Ω(err).ShouldNot(HaveOccurred())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package input_files
import (
"path/filepath"

i18n "github.com/maximilien/i18n4go/i18n"
i18n "github.com/maximilien/i18n4go/i18n4go/i18n"
)

var T i18n.TranslateFunc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package nested_dir
import (
"path/filepath"

i18n "github.com/maximilien/i18n4go/i18n"
i18n "github.com/maximilien/i18n4go/i18n4go/i18n"
)

var T i18n.TranslateFunc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package input_files
import (
"path/filepath"

i18n "github.com/maximilien/i18n4go/i18n"
i18n "github.com/maximilien/i18n4go/i18n4go/i18n"
)

var T i18n.TranslateFunc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"path/filepath"

"github.com/maximilien/i18n4go/i18n"
i18n "github.com/maximilien/i18n4go/i18n4go/i18n"
)

var T i18n.TranslateFunc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"path/filepath"

"github.com/maximilien/i18n4go/i18n"
i18n "github.com/maximilien/i18n4go/i18n4go/i18n"
)

var T i18n.TranslateFunc
Expand Down

0 comments on commit 74bbc47

Please sign in to comment.