30 lines
569 B
Go
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"))
|
|
}
|