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:
commit
2393eff21c
11
README
Normal file
11
README
Normal 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
|
25
main.go
Normal file
25
main.go
Normal 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"))
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user