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
This commit is contained in:
novaburst 2022-05-10 12:13:40 +00:00
commit 2393eff21c
3 changed files with 39 additions and 0 deletions

11
README Normal file
View File

@ -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

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module git.076.ne.jp/novaburst/antifetch
go 1.18

25
main.go Normal file
View File

@ -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"))
}