cmd .exe /c go build
....\browserdata\bookmark\bookmark.go:5:2: package log/slog is not in GOROOT (D:\src\log\slog)
note: imported by a module that requires go 1.22
....\browser\chromium\chromium.go:8:2: package slices is not in GOROOT (D:\src\slices)
note: imported by a module that requires go 1.22
hackbrowser编译需要go 1.22以上版本
This is a known issue, you can refer to the Link below and their corresponding solutions, we will consider lowering the golang version to address more usage scenarios.
cmd .exe /c go build ....\browserdata\bookmark\bookmark.go:5:2: package log/slog is not in GOROOT (D:\src\log\slog) note: imported by a module that requires go 1.22 ....\browser\chromium\chromium.go:8:2: package slices is not in GOROOT (D:\src\slices) note: imported by a module that requires go 1.22 hackbrowser编译需要go 1.22以上版本
升级完go版本后确实可以解决该问题,但go 1.21版本后不再支持 Windows7、Windows2008、Windows2012