Skip to content

Code does not compile/run. #3

Description

@sagarsubedi

I am at 3 Handing some flesh on the task skeleton part of the book. I wrote the Config struct and the code from that. The problem I think is with the docker sdk. The types.ImagePullOption does not work. I get red squiggly line under that and it says not defined. I googled and tried a few solution including pointing to the moby/moby repo and whatever else some people suggested but I am having a hard time. It was fun to study the book but I cannot continue any longer. Here is the error I get:

go run main.go
# github.com/docker/docker/client
../../../../go/pkg/mod/github.com/docker/docker@v27.2.0+incompatible/client/errors.go:28:16: undefined: errors.As
../../../../go/pkg/mod/github.com/docker/docker@v27.2.0+incompatible/client/request.go:127:14: undefined: errors.Is
../../../../go/pkg/mod/github.com/docker/docker@v27.2.0+incompatible/client/request.go:129:14: undefined: errors.Is
../../../../go/pkg/mod/github.com/docker/docker@v27.2.0+incompatible/client/request.go:153:13: undefined: errors.Is

I followed the instructions on the book to download the docker sdk.

Hoping for some help with this. Thank you for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions