Skip to content

Commit

Permalink
bump module version to v2 to reflect a major refactoring
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <[email protected]>
  • Loading branch information
ndeloof committed Oct 20, 2023
1 parent d1c4ab7 commit 1fc8d35
Show file tree
Hide file tree
Showing 48 changed files with 79 additions and 79 deletions.
12 changes: 6 additions & 6 deletions cli/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"

"github.com/compose-spec/compose-go/consts"
"github.com/compose-spec/compose-go/dotenv"
"github.com/compose-spec/compose-go/errdefs"
"github.com/compose-spec/compose-go/loader"
"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/utils"
"github.com/compose-spec/compose-go/v2/consts"
"github.com/compose-spec/compose-go/v2/dotenv"
"github.com/compose-spec/compose-go/v2/errdefs"
"github.com/compose-spec/compose-go/v2/loader"
"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v2/utils"
)

// ProjectOptions provides common configuration for loading a project.
Expand Down
6 changes: 3 additions & 3 deletions cli/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import (
"path/filepath"
"testing"

"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/types"
"gotest.tools/v3/assert"

"github.com/compose-spec/compose-go/consts"
"github.com/compose-spec/compose-go/utils"
"github.com/compose-spec/compose-go/v2/consts"
"github.com/compose-spec/compose-go/v2/utils"
)

func TestProjectName(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion dotenv/godotenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"regexp"
"strings"

"github.com/compose-spec/compose-go/template"
"github.com/compose-spec/compose-go/v2/template"
)

var utf8BOM = []byte("\uFEFF")
Expand Down
2 changes: 1 addition & 1 deletion dotenv/godotenv_var_expansion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dotenv
import (
"testing"

"github.com/compose-spec/compose-go/template"
"github.com/compose-spec/compose-go/v2/template"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion format/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"unicode"
"unicode/utf8"

"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/types"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion format/volume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"testing"

"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/types"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
)
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/compose-spec/compose-go
module github.com/compose-spec/compose-go/v2

go 1.19

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

"github.com/compose-spec/compose-go/template"
"github.com/compose-spec/compose-go/tree"
"github.com/compose-spec/compose-go/v2/template"
"github.com/compose-spec/compose-go/v2/tree"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion interpolation/interpolation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"strconv"
"testing"

"github.com/compose-spec/compose-go/tree"
"github.com/compose-spec/compose-go/v2/tree"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
)
Expand Down
6 changes: 3 additions & 3 deletions loader/extends.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"fmt"
"path/filepath"

"github.com/compose-spec/compose-go/consts"
"github.com/compose-spec/compose-go/override"
"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/consts"
"github.com/compose-spec/compose-go/v2/override"
"github.com/compose-spec/compose-go/v2/types"
)

func ApplyExtends(ctx context.Context, dict map[string]any, workingdir string, opts *Options, ct *cycleTracker, post ...PostProcessor) error {
Expand Down
2 changes: 1 addition & 1 deletion loader/full-struct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strings"
"time"

"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/types"
)

func fullExampleProject(workingDir, homeDir string) *types.Project {
Expand Down
6 changes: 3 additions & 3 deletions loader/include.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"reflect"
"strings"

"github.com/compose-spec/compose-go/dotenv"
interp "github.com/compose-spec/compose-go/interpolation"
"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/dotenv"
interp "github.com/compose-spec/compose-go/v2/interpolation"
"github.com/compose-spec/compose-go/v2/types"
"github.com/pkg/errors"
)

Expand Down
4 changes: 2 additions & 2 deletions loader/interpolate.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"strconv"
"strings"

interp "github.com/compose-spec/compose-go/interpolation"
"github.com/compose-spec/compose-go/tree"
interp "github.com/compose-spec/compose-go/v2/interpolation"
"github.com/compose-spec/compose-go/v2/tree"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
Expand Down
20 changes: 10 additions & 10 deletions loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ import (
"strconv"
"strings"

"github.com/compose-spec/compose-go/consts"
interp "github.com/compose-spec/compose-go/interpolation"
"github.com/compose-spec/compose-go/override"
"github.com/compose-spec/compose-go/paths"
"github.com/compose-spec/compose-go/schema"
"github.com/compose-spec/compose-go/template"
"github.com/compose-spec/compose-go/transform"
"github.com/compose-spec/compose-go/tree"
"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/validation"
"github.com/compose-spec/compose-go/v2/consts"
interp "github.com/compose-spec/compose-go/v2/interpolation"
"github.com/compose-spec/compose-go/v2/override"
"github.com/compose-spec/compose-go/v2/paths"
"github.com/compose-spec/compose-go/v2/schema"
"github.com/compose-spec/compose-go/v2/template"
"github.com/compose-spec/compose-go/v2/transform"
"github.com/compose-spec/compose-go/v2/tree"
"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v2/validation"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
"gopkg.in/yaml.v3"
Expand Down
2 changes: 1 addition & 1 deletion loader/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"

"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/types"
)

func buildConfigDetails(yaml string, env map[string]string) types.ConfigDetails {
Expand Down
2 changes: 1 addition & 1 deletion loader/loader_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package loader
import (
"testing"

"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/types"
"gotest.tools/v3/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion loader/loader_yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"testing"

"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/types"
"gotest.tools/v3/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion loader/mapstructure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package loader
import (
"testing"

"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/types"
"github.com/mitchellh/mapstructure"
"gotest.tools/v3/assert"
)
Expand Down
4 changes: 2 additions & 2 deletions loader/normalize.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"fmt"
"strings"

"github.com/compose-spec/compose-go/errdefs"
"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/errdefs"
"github.com/compose-spec/compose-go/v2/types"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
Expand Down
2 changes: 1 addition & 1 deletion loader/normalize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"os"
"testing"

"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/types"
"gotest.tools/v3/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion loader/null.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"strconv"

"github.com/compose-spec/compose-go/tree"
"github.com/compose-spec/compose-go/v2/tree"
"gopkg.in/yaml.v3"
)

Expand Down
2 changes: 1 addition & 1 deletion loader/paths.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"path/filepath"
"strings"

"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/types"
)

// ResolveRelativePaths resolves relative paths based on project WorkingDirectory
Expand Down
4 changes: 2 additions & 2 deletions loader/paths_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"path/filepath"
"testing"

"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/types"
"gotest.tools/v3/assert"
)

Expand Down Expand Up @@ -100,7 +100,7 @@ services:
"image": "docker-image://foo",
"oci": "oci-layout://foo",
"abs_path": abs,
"github": "github.com/compose-spec/compose-go",
"github": "github.com/compose-spec/compose-go/v2",
"rel_path": filepath.Join(wd, "testdata"),
},
}
Expand Down
4 changes: 2 additions & 2 deletions loader/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"fmt"
"strings"

"github.com/compose-spec/compose-go/errdefs"
"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/errdefs"
"github.com/compose-spec/compose-go/v2/types"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion loader/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"gotest.tools/v3/assert"

"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/types"
)

func TestValidateAnonymousVolume(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion loader/with-version-struct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package loader
import (
"path/filepath"

"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/types"
)

func withVersionExampleConfig() *types.Config {
Expand Down
2 changes: 1 addition & 1 deletion override/extends.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package override

import "github.com/compose-spec/compose-go/tree"
import "github.com/compose-spec/compose-go/v2/tree"

func ExtendService(base, override map[string]any) (map[string]any, error) {
yaml, err := mergeYaml(base, override, tree.NewPath("services.x"))
Expand Down
2 changes: 1 addition & 1 deletion override/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"strings"

"github.com/compose-spec/compose-go/tree"
"github.com/compose-spec/compose-go/v2/tree"
"golang.org/x/exp/slices"
)

Expand Down
4 changes: 2 additions & 2 deletions override/uncity.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"strconv"
"strings"

"github.com/compose-spec/compose-go/format"
"github.com/compose-spec/compose-go/tree"
"github.com/compose-spec/compose-go/v2/format"
"github.com/compose-spec/compose-go/v2/tree"
)

type indexer func(any, tree.Path) (string, error)
Expand Down
4 changes: 2 additions & 2 deletions paths/resolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"fmt"
"path/filepath"

"github.com/compose-spec/compose-go/tree"
"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/tree"
"github.com/compose-spec/compose-go/v2/types"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion transform/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package transform

import (
"github.com/compose-spec/compose-go/tree"
"github.com/compose-spec/compose-go/v2/tree"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion transform/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"reflect"
"testing"

"github.com/compose-spec/compose-go/tree"
"github.com/compose-spec/compose-go/v2/tree"
"gotest.tools/v3/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion transform/canonical.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package transform

import (
"github.com/compose-spec/compose-go/tree"
"github.com/compose-spec/compose-go/v2/tree"
)

type transformFunc func(data any, p tree.Path) (any, error)
Expand Down
2 changes: 1 addition & 1 deletion transform/dependson.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package transform
import (
"fmt"

"github.com/compose-spec/compose-go/tree"
"github.com/compose-spec/compose-go/v2/tree"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion transform/external.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package transform
import (
"fmt"

"github.com/compose-spec/compose-go/tree"
"github.com/compose-spec/compose-go/v2/tree"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
Expand Down
2 changes: 1 addition & 1 deletion transform/include.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package transform

import (
"github.com/compose-spec/compose-go/tree"
"github.com/compose-spec/compose-go/v2/tree"
"github.com/pkg/errors"
)

Expand Down
4 changes: 2 additions & 2 deletions transform/ports.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package transform
import (
"fmt"

"github.com/compose-spec/compose-go/tree"
"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/tree"
"github.com/compose-spec/compose-go/v2/types"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
)
Expand Down
Loading

0 comments on commit 1fc8d35

Please sign in to comment.