Debian Codegraph @

scripts/go-fix.sh

raw symbols SCIP
1 #!/bin/bash
2
3 set -euo pipefail
4
5 # reflecttypefor currently does a few things that don't make sense. Disable it
6 # for now, see https://github.com/golang/go/issues/78452.
7 args=("-reflecttypefor=false")
8
9 # Include a big-endian architecture to make sure all code is considered.
10 arches=(linux/amd64 linux/mips64 darwin/amd64 windows/amd64)
11
12 for arch in "${arches[@]}"; do
13 IFS='/' read -r goos goarch <<< "$arch"
14 echo "GOOS=$goos GOARCH=$goarch go fix ${args[*]} ./..."
15 GOOS=$goos GOARCH=$goarch go fix "${args[@]}" ./...
16 done