go-starter
go-starter copied to clipboard
Bug mit M2 Prozessor
Beim Versuch den Package zu installieren und auf dem Macbook mit M2 Prozessot laufen lassen, Installierung von Golangci-lint schlägt fehl. Das passiert, weil Packages mit curl heruntergeladen werden und es kann nicht richtig erkennen, welche zu laden.
# go linting: (this package should NOT be installed via go get)
# https://github.com/golangci/golangci-lint#binary
# https://github.com/golangci/golangci-lint/releases
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \
| sh -s -- -b $(go env GOPATH)/bin v1.45.2
Momentan in Docker File sieht es so aus.
Es ist möglich dieses Problem zu beheben, wenn man stattdessen doch mit Go Install Golangci-lint installiert.
RUN go install github.com/golangci/golangci-lint/cmd/[email protected]
Dann wird Go richtige Version für richtige Prozessorarchitektur installieren.
Hi @FedorchukAndrii .
Thanks for opening this issue. Unfortunately we currently do not support Apples M1/M2 or the ARM architecture yet, but will be looking into this in the future (we currently lack those dev/test devices).
Furthermore go install
ing golangci-lint
is actually discouraged, see here. However, we could potentially grab the binaries (arch-dependent) directly from their golangci/golangci-lint
docker image.
Kind regards, Mario
Hi @majodev.
Yeah, i have seen, that it can't been guaranteed to working, but actually it works fine. I'll use your go-starter kit on my M2 Processor, and by explore any Bugs will report about it in this Issue or about Bug Fixes with M1/M2.
Kind regards, Andrii
Hi @majodev.
This can be a Solution for installation of gotestsum, that depends on different Architecture, if anyone need it.
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) \
&& mkdir -p /tmp/gotestsum \
&& cd /tmp/gotestsum \
&& wget https://github.com/gotestyourself/gotestsum/releases/download/v1.8.2/gotestsum_1.8.2_linux_${arch}.tar.gz \
&& tar xzf gotestsum_1.8.2_linux_${arch}.tar.gz \
&& cp gotestsum /usr/local/bin/gotestsum \
&& rm -rf /tmp/gotestsum
Hi @driif,
with the newest version of go-starter we now support arm architecture.
Cheers, Manuel