tshakalekholoane/bat

issue: Fails to build: cannot load embed: malformed module path "embed"

ElectricRCAircraftGuy opened this issue · 3 comments

go build ./cmd/bat/ results in

build tshaka.co/bat/cmd/bat: cannot load embed: malformed module path "embed": missing dot in first path element

Steps to reproduce on Ubuntu 20.04:

cd ~/dev
git clone https://github.com/tshakalekholoane/bat.git
cd bat
sudo apt install golang-go
time go build ./cmd/bat/

output:

~/GS/dev/bat$ time go build ./cmd/bat/
build tshaka.co/bat/cmd/bat: cannot load embed: malformed module path "embed": missing dot in first path element

And a slightly different attempt (seems to have resolved the error above, but now results in a new one):

~/GS/dev/bat$ time go build cmd/bat/
can't load package: package cmd/bat: package cmd/bat is not in GOROOT (/usr/lib/go-1.13/src/cmd/bat)

Which version of Go are you running?

Which version of Go are you running?

$ go version
go version go1.13.8 linux/amd64

Embedded files were only introduced in Go 1.16. Try with a version later than that if you prefer building over grabbing a binary from the releases page.