Kethsar / ytarchive

Garbage Youtube livestream downloader
MIT License
1.04k stars 86 forks source link

Increase required Go version to 1.17 in go.mod #127

Closed marsam closed 1 year ago

marsam commented 1 year ago

Otherwise, building it with recent Go throws an error:

unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)
ipid commented 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.