diff --git a/Makefile b/Makefile index 90d3fe0..a41b03e 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ PREFIX=/usr/local OUTPUT=antifetch build: - go build -v -o ${OUTPUT} + go build -v ./cmd/${OUTPUT} clean: rm -f ${OUTPUT} install: diff --git a/main.go b/cmd/antifetch/main.go similarity index 72% rename from main.go rename to cmd/antifetch/main.go index 8cb8482..9866fc8 100644 --- a/main.go +++ b/cmd/antifetch/main.go @@ -15,14 +15,12 @@ import ( ) func main() { - getHost, errhost := os.Hostname() + host, err := os.Hostname() - if errhost != nil { - log.Fatal(errhost) + if err != nil { + log.Fatal(err) } - - // Pretty-print output - fmt.Printf("%s (%d) @ %s", os.Getenv("USER"), os.Getuid(), getHost) + 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)