Skip to content

Latest commit

 

History

History
53 lines (45 loc) · 3.51 KB

GO_OS_ARCH.md

File metadata and controls

53 lines (45 loc) · 3.51 KB

Golang supported OS/Arch table go1.23

GOOS GOARCH

Architecture GOOS →
GOARCH↓
aix android darwin dragonfly freebsd illumos ios js linux netbsd openbsd plan9 solaris wasip1 windows
x86 32-bit 386                
x86 64-bit amd64      
ARM 32-bit arm            
ARM 64-bit arm64              
LoongArch 64-bit loong64                            
MIPS 32-bit,
big-endian
mips                            
MIPS 64-bit,
big-endian
mips64                            
MIPS 64-bit,
little-endian
mips64le                            
MIPS 32-bit,
little-endian
mipsle                            
PowerPC 64-bit,
big-endian
ppc64                        
PowerPC 64-bit,
little-endian
ppc64le                            
RISC-V 64-bit riscv64                        
IBM ESA/390 s390x                            
WebAssembly wasm                          

script for print Markdown table

#!/bin/bash

DIST=$(go tool dist list)
OSes=$(go tool dist list | awk -F '/' '{print $1}' | sort -u)
ARCHes=$(go tool dist list | awk -F '/' '{print $2}' | sort -u)

# print table header
echo '|&#32;&#32;GOOS&#32;→<br>GOARCH↓|`'$OSes'`|' | sed 's/\ /`|`/g'

# print separator
echo -n '|:--------:|'
for o in $OSes; do
	echo -n ':------:|'
done
echo

# print table body
for a in $ARCHes; do
	printf '|%-10s' '`'$a'`'
	for o in $OSes; do
		if `echo $DIST | grep "$o/$a" &> /dev/null`; then
			echo -n '|&#10004;'
		else
			echo -n '| &nbsp; '
		fi
	done
	echo '|'
done