Golang mimetypes are where?

When golang’s http package is associating mimetypes with file extensions it has a small set built-in but the rest come from the host filesystem and in linux they are in a “standardplace”. Clearlinux puts that file is a different location… Either the file needs to be moved back to the usual place or golang needs to be updated to support clearlinux’ choices.

I recommend the following for golang:

sudo swupd bundle-remove go-basic

On Any Distro

in terminal:

go_version=1.15.6 # check https://golang.org/dl/ for current stable version 
mkdir -p ~/Projects/go/{src,pkg,bin}
curl -sL  "https://golang.org/dl/go${go_version}.linux-amd64.tar.gz" > go.tar.gz
tar -xvf go.tar.gz
sudo mv go/ /usr/local
cat <<'EOF' |  tee -a  ~/.bashrc
export GOROOT=/usr/local/go
export GOPATH=/home/$USER/Projects/go
export PATH=$PATH:$GOROOT/bin
export PATH=$PATH:$GOPATH/bin
EOF
2 Likes