When installing etcd, an error message appears:
cannot find module providing package github.com/coreos/go-systemd/journal
Provides an error in go1.12, but the compilation passes.
go1.13 error.
The solution is as follows:
1. Pull go-systemd from github and save it to $GOPATH src
git clone github.com/coreos/go-systemd
2. Use replace Replace go-systemd
## go.mod replace github.com/coreos/go-systemd => /home/xingyys/Go/src/github.com/coreos/go-systemd
in go.mod. Note here:
Do not use the path github.com/coreos/go-systemd/journal
directly. Because there is no go.mod file in this path.
Requires the previous directory.