Closed marsam closed 1 year ago
The code actually requires Go 1.19 because ErrDot is used.
I tried to use Go 1.17 but it didn't compile:
> docker run -it --rm -v $(pwd):/ytarchive golang:1.17 bash
$ cd /ytarchive && go build
go: downloading github.com/alessio/shellescape v1.4.1
go: downloading github.com/mattn/go-colorable v0.1.11
go: downloading golang.org/x/net v0.0.0-20210510120150-4163338589ed
go: downloading github.com/mattn/go-isatty v0.0.14
go: downloading golang.org/x/sys v0.3.0
# github.com/Kethsar/ytarchive
./main.go:838:20: undefined: exec.ErrDot
./util.go:267:18: cmd.Err undefined (type *exec.Cmd has no field or method Err)
./util.go:267:24: undefined: exec.ErrDot
./util.go:268:6: cmd.Err undefined (type *exec.Cmd has no field or method Err)
The go *.*
field of go.mod
should point out the exact minimal version that required by the module. So it should be go 1.19
.
Otherwise, building it with recent Go throws an error: