RosettaCodeData/Task/Host-introspection/Go/host-introspection-2.go
2023-07-01 13:44:08 -04:00

17 lines
238 B
Go

package main
import (
"debug/elf"
"fmt"
"os"
)
func main() {
f, err := elf.Open(os.Args[0])
if err != nil {
fmt.Println(" ", err)
return
}
fmt.Println(f.FileHeader.ByteOrder)
f.Close()
}