I'm new on Go.
Trying to use the docker api to manage containers.
I have been trying to create the following setup:
import (
"github.com/docker/docker/api/types/container"
"github.com/go-connections/nat"
)
config := &container.Config{
Image: "nginx",
ExposedPorts: nat.PortSet{
"4140/tcp": struct{}{},
},
}
unfortunately, im getting error:
Cannot use nat.PortSet{"4140/tcp": struct{}{}, }(type PortSet) as type nat.PortSet
./docker_test.go:15:15: cannot use "github.com/docker/go-connections/nat".PortSet literal (type "github.com/docker/go-connections/nat".PortSet) as type "github.com/docker/docker/vendor/github.com/docker/go-connections/nat".PortSet in field value
Cant understand what i'm doing wrong? Thanks!