commit 2393eff21c30098ac89015fd040159c00f9d9718 Author: novaburst Date: Tue May 10 12:13:40 2022 +0000 I am Magnus. You are registered in my memory banks... git-svn-id: file:///srv/svn/repo/mima/trunk@1 d2428f92-30f9-164c-8098-19ee57ce342c diff --git a/README b/README new file mode 100644 index 0000000..d2effba --- /dev/null +++ b/README @@ -0,0 +1,11 @@ +* antifetch +A silly reimplementation of nofetch(1) from posix-sh-tools in Go +Where most information is provided by yourself! + +i.e. OS (operating system), ARCH (architecture), and HOST (hostname) + +``` +ARCH=$(uname -m) HOST=$(hostname) OS=$(uname) go run main.go +``` + +Licensed under DPL-1.1 \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..e2c1f9a --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.076.ne.jp/novaburst/antifetch + +go 1.18 diff --git a/main.go b/main.go new file mode 100644 index 0000000..105aa84 --- /dev/null +++ b/main.go @@ -0,0 +1,25 @@ +// All Rites Reversed (ΔΈ) 3188 Aoi Koizumi + +/* + This is a silly nofetch(1) reimplementation in Go. + Where most information is provided by yourself! + i.e. OS, ARCH, HOSTNAME + + Also it only uses parts of the standard library +*/ + +package main + +import ( + "fmt" + "os" +) + +func main() { + fmt.Printf("User: %s (%d) \n",os.Getenv("USER") ,os.Getuid()) + fmt.Printf("Editor: %s \n", os.Getenv("EDITOR")) + fmt.Printf("Operating System: %s \n", os.Getenv("OS")) + fmt.Printf("Architecture: %s \n", os.Getenv("ARCH")) + fmt.Printf("Hostname: %s \n", os.Getenv("HOSTNAME")) + fmt.Printf("Shell: %s \n", os.Getenv("SHELL")) +}