Skip to content

Commit a9a6965

Browse files
committed
internal/semver: copy from golang.org/x/mod
All files copied from v0.6.0. This means that the CUE-related modules functionality depends only on code in this repository. For #2330. Signed-off-by: Roger Peppe <[email protected]> Change-Id: I29b9de0618c5cabbb05bbbd32b2f85911e67be01 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1168634 TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
1 parent b4583de commit a9a6965

File tree

8 files changed

+604
-6
lines changed

8 files changed

+604
-6
lines changed

cue/load/module.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"cuelang.org/go/internal/mod/modfile"
1313
"cuelang.org/go/internal/mod/module"
1414
"cuelang.org/go/internal/mod/mvs"
15-
"golang.org/x/mod/semver"
15+
"cuelang.org/go/internal/mod/semver"
1616
)
1717

1818
// loadModule loads the module file, resolves and downloads module

internal/mod/modfile/modfile.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"fmt"
2020
"sync"
2121

22-
"golang.org/x/mod/semver"
22+
"cuelang.org/go/internal/mod/semver"
2323

2424
"cuelang.org/go/cue"
2525
"cuelang.org/go/cue/cuecontext"

internal/mod/modregistry/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ import (
2626

2727
"cuelabs.dev/go/oci/ociregistry"
2828
"cuelabs.dev/go/oci/ociregistry/ociclient"
29+
"cuelang.org/go/internal/mod/semver"
2930
digest "github.com/opencontainers/go-digest"
3031
specs "github.com/opencontainers/image-spec/specs-go"
3132
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
32-
"golang.org/x/mod/semver"
3333

3434
"cuelang.org/go/internal/mod/modfile"
3535
"cuelang.org/go/internal/mod/module"

internal/mod/module/module.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"sort"
2828
"strings"
2929

30-
"golang.org/x/mod/semver"
30+
"cuelang.org/go/internal/mod/semver"
3131
)
3232

3333
// A Version (for clients, a module.Version) is defined by a module path and version pair.

internal/mod/module/path.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"unicode"
99
"unicode/utf8"
1010

11-
"golang.org/x/mod/semver"
11+
"cuelang.org/go/internal/mod/semver"
1212
)
1313

1414
// The following regular expressions come from https://github.com/opencontainers/distribution-spec/blob/main/spec.md#pulling-manifests

internal/mod/module/versions.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package module
22

33
import (
4-
"golang.org/x/mod/semver"
4+
"cuelang.org/go/internal/mod/semver"
55
)
66

77
// Versions implements mvs.Versions[Version].

0 commit comments

Comments
 (0)