I'm trying to upgrade my project to use Go modules for dependency management. I recognize this a new/experimental feature. I'm getting an error: cannot find module providing package
.
My go.mod
currently reads:
require (
github.com/bugsnag/bugsnag-go v1.5.1
github.com/bwmarrin/discordgo v0.19.0
github.com/jonas747/dshardmanager v0.0.0-20180911185241-9e4282faed43
)
My Dockerfile:
FROM golang:1.12-alpine
RUN mkdir /app
WORKDIR /app
ADD src/ /app
ENV CGO_ENABLED=0
# Building requires git because we're pulling a dependency by commit hash
RUN apk add --no-cache --update git \
&& go build ./... \
&& apk del git
CMD ["/app/main"]
When building, it fails with:
cannot load github.com/bugsnag/panicwrap: cannot find module providing package github.com/bugsnag/panicwrap
When I look at https://github.com/bugsnag/bugsnag-go I don't see a go.mod
file. Is this error indicating that this dependency doesn't support modules?