mirror of
https://github.com/crazy-max/diun.git
synced 2025-12-21 21:33:22 +01:00
chore: fix deprecated docker reference and container list opts
This commit is contained in:
4
go.mod
4
go.mod
@@ -12,7 +12,7 @@ require (
|
|||||||
github.com/crazy-max/cron/v3 v3.1.1
|
github.com/crazy-max/cron/v3 v3.1.1
|
||||||
github.com/crazy-max/gohealthchecks v0.4.1
|
github.com/crazy-max/gohealthchecks v0.4.1
|
||||||
github.com/crazy-max/gonfig v0.7.1
|
github.com/crazy-max/gonfig v0.7.1
|
||||||
github.com/docker/distribution v2.8.3+incompatible
|
github.com/distribution/reference v0.5.0
|
||||||
github.com/docker/docker v26.1.4+incompatible
|
github.com/docker/docker v26.1.4+incompatible
|
||||||
github.com/docker/go-connections v0.5.0
|
github.com/docker/go-connections v0.5.0
|
||||||
github.com/docker/go-units v0.5.0
|
github.com/docker/go-units v0.5.0
|
||||||
@@ -71,7 +71,7 @@ require (
|
|||||||
github.com/containers/ocicrypt v1.1.10 // indirect
|
github.com/containers/ocicrypt v1.1.10 // indirect
|
||||||
github.com/containers/storage v1.53.0 // indirect
|
github.com/containers/storage v1.53.0 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/distribution/reference v0.5.0 // indirect
|
github.com/docker/distribution v2.8.3+incompatible // indirect
|
||||||
github.com/docker/docker-credential-helpers v0.8.1 // indirect
|
github.com/docker/docker-credential-helpers v0.8.1 // indirect
|
||||||
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
|
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
|
||||||
github.com/felixge/fgprof v0.9.3 // indirect
|
github.com/felixge/fgprof v0.9.3 // indirect
|
||||||
|
|||||||
@@ -4,12 +4,13 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"github.com/docker/docker/api/types"
|
"github.com/docker/docker/api/types"
|
||||||
|
"github.com/docker/docker/api/types/container"
|
||||||
"github.com/docker/docker/api/types/filters"
|
"github.com/docker/docker/api/types/filters"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ContainerList returns Docker containers
|
// ContainerList returns Docker containers
|
||||||
func (c *Client) ContainerList(filterArgs filters.Args) ([]types.Container, error) {
|
func (c *Client) ContainerList(filterArgs filters.Args) ([]types.Container, error) {
|
||||||
containers, err := c.API.ContainerList(c.ctx, types.ContainerListOptions{
|
containers, err := c.API.ContainerList(c.ctx, container.ListOptions{
|
||||||
Filters: filterArgs,
|
Filters: filterArgs,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/containers/image/v5/docker"
|
"github.com/containers/image/v5/docker"
|
||||||
"github.com/containers/image/v5/types"
|
"github.com/containers/image/v5/types"
|
||||||
"github.com/docker/distribution/reference"
|
"github.com/distribution/reference"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user