mima/cmd/antifetch/main.go
admin b36998e141 A 6-char limit is like night.
git-svn-id: file:///srv/svn/repo/mima/trunk@8 d2428f92-30f9-164c-8098-19ee57ce342c
2022-09-06 21:18:31 +00:00

30 lines
569 B
Go

// All Rites Reversed (ĸ) 3188 Aoi Koizumi
/*
This is a silly nofetch(1) reimplementation in Go.
Also it only uses the standard library
*/
package main
import (
"fmt"
"os"
"log"
"runtime"
)
func main() {
host, err := os.Hostname()
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s (%d) @ %s", os.Getenv("USER"), os.Getuid(), host)
fmt.Printf("\n")
fmt.Printf("Editor: %s\n", os.Getenv("EDITOR"))
fmt.Printf("Operating System: %s\n", runtime.GOOS)
fmt.Printf("Architecture: %s\n", runtime.GOARCH)
fmt.Printf("Shell: %s\n", os.Getenv("SHELL"))
}