Skip to content

Commit

Permalink
Rename the package to github.com/containerd/cgroups/v3
Browse files Browse the repository at this point in the history
containerd/cgroups 1.0.x is having v2 directory which makes importing
github.com/containerd/cgroups/v2 ambiguous.

So the gogo-less version will be v3 and we will skip v2.

Signed-off-by: Kazuyoshi Kato <[email protected]>
  • Loading branch information
kzys committed Nov 9, 2022
1 parent cc78c6c commit 199ff0b
Show file tree
Hide file tree
Showing 20 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ so the resulting slice would be located here on disk:

```go
import (
"github.com/containerd/cgroups/v2/cgroup2"
"github.com/containerd/cgroups/v3/cgroup2"
specs "github.com/opencontainers/runtime-spec/specs-go"
)

Expand Down
2 changes: 1 addition & 1 deletion cgroup1/blkio.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"strconv"
"strings"

v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
v1 "github.com/containerd/cgroups/v3/cgroup1/stats"

specs "github.com/opencontainers/runtime-spec/specs-go"
)
Expand Down
2 changes: 1 addition & 1 deletion cgroup1/blkio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"strings"
"testing"

v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
v1 "github.com/containerd/cgroups/v3/cgroup1/stats"
)

const data = `major minor #blocks name
Expand Down
2 changes: 1 addition & 1 deletion cgroup1/cgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"syscall"
"time"

v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
v1 "github.com/containerd/cgroups/v3/cgroup1/stats"

"github.com/opencontainers/runtime-spec/specs-go"
)
Expand Down
2 changes: 1 addition & 1 deletion cgroup1/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package cgroup1
import (
"os"

v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
v1 "github.com/containerd/cgroups/v3/cgroup1/stats"
specs "github.com/opencontainers/runtime-spec/specs-go"
)

Expand Down
2 changes: 1 addition & 1 deletion cgroup1/cpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"path/filepath"
"strconv"

v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
v1 "github.com/containerd/cgroups/v3/cgroup1/stats"
specs "github.com/opencontainers/runtime-spec/specs-go"
)

Expand Down
2 changes: 1 addition & 1 deletion cgroup1/cpuacct.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strconv"
"strings"

v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
v1 "github.com/containerd/cgroups/v3/cgroup1/stats"
)

const nanosecondsInSecond = 1000000000
Expand Down
2 changes: 1 addition & 1 deletion cgroup1/hugetlb.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strconv"
"strings"

v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
v1 "github.com/containerd/cgroups/v3/cgroup1/stats"
specs "github.com/opencontainers/runtime-spec/specs-go"
)

Expand Down
2 changes: 1 addition & 1 deletion cgroup1/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"strconv"
"strings"

v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
v1 "github.com/containerd/cgroups/v3/cgroup1/stats"
specs "github.com/opencontainers/runtime-spec/specs-go"
"golang.org/x/sys/unix"
)
Expand Down
2 changes: 1 addition & 1 deletion cgroup1/memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"strings"
"testing"

v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
v1 "github.com/containerd/cgroups/v3/cgroup1/stats"
)

const memoryData = `cache 1
Expand Down
2 changes: 1 addition & 1 deletion cgroup1/pids.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strconv"
"strings"

v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
v1 "github.com/containerd/cgroups/v3/cgroup1/stats"
specs "github.com/opencontainers/runtime-spec/specs-go"
)

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

v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
v1 "github.com/containerd/cgroups/v3/cgroup1/stats"
"github.com/opencontainers/runtime-spec/specs-go"
)

Expand Down
2 changes: 1 addition & 1 deletion cgroup1/rdma.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"strconv"
"strings"

v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
v1 "github.com/containerd/cgroups/v3/cgroup1/stats"
specs "github.com/opencontainers/runtime-spec/specs-go"
)

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

"github.com/containerd/cgroups/v2"
v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
"github.com/containerd/cgroups/v3"
v1 "github.com/containerd/cgroups/v3/cgroup1/stats"
specs "github.com/opencontainers/runtime-spec/specs-go"
)

Expand Down
2 changes: 1 addition & 1 deletion cgroup1/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"strings"
"time"

"github.com/containerd/cgroups/v2"
"github.com/containerd/cgroups/v3"
units "github.com/docker/go-units"
specs "github.com/opencontainers/runtime-spec/specs-go"
)
Expand Down
2 changes: 1 addition & 1 deletion cgroup2/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"syscall"
"time"

"github.com/containerd/cgroups/v2/cgroup2/stats"
"github.com/containerd/cgroups/v3/cgroup2/stats"

systemdDbus "github.com/coreos/go-systemd/v22/dbus"
"github.com/godbus/dbus/v5"
Expand Down
2 changes: 1 addition & 1 deletion cgroup2/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"strings"
"time"

"github.com/containerd/cgroups/v2/cgroup2/stats"
"github.com/containerd/cgroups/v3/cgroup2/stats"

"github.com/godbus/dbus/v5"
"github.com/opencontainers/runtime-spec/specs-go"
Expand Down
4 changes: 2 additions & 2 deletions cmd/cgctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"os"
"strconv"

"github.com/containerd/cgroups/v2"
"github.com/containerd/cgroups/v2/cgroup2"
"github.com/containerd/cgroups/v3"
"github.com/containerd/cgroups/v3/cgroup2"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ module github.com/containerd/cgroups/cmd

go 1.16

replace github.com/containerd/cgroups/v2 => ../
replace github.com/containerd/cgroups/v3 => ../

require (
github.com/containerd/cgroups/v2 v2.0.0-00010101000000-000000000000
github.com/containerd/cgroups/v3 v3.0.0-00010101000000-000000000000
github.com/sirupsen/logrus v1.8.1
github.com/urfave/cli v1.22.5
)
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/containerd/cgroups/v2
module github.com/containerd/cgroups/v3

go 1.17

Expand Down

0 comments on commit 199ff0b

Please sign in to comment.