got rid of the weird main.go

This commit is contained in:
Arzumify 2024-09-12 18:20:44 +01:00
parent b329a7ba52
commit 6fcd316f39

36
main.go
View file

@ -2,42 +2,8 @@ package main
import (
"fmt"
"os"
"os/exec"
)
// Hello, fellow programmer! This is a warning script.
// It is meant for idiots who don't read the README.md file.
// If you are reading this, you are probably one of those idiots.
// Please use the Makefile to build eon.
// If you are trying to contribute to eon, then start by reading the README.md file.
// That might have a teensy weensy bit of useful information.
// ;) Have a great day (unless you are using this script in production).
func main() {
fmt.Println("[WARN] This isn't how you are meant to build eon. Please use the Makefile.")
fmt.Println("[INFO] This script only exists as a warning and so go test has something to run.")
fmt.Print("[PROMPT] Would you like me to run the makefile for you? (y/n): ")
var input string
_, err := fmt.Scanln(&input)
if err != nil {
fmt.Println("[FATAL] Error reading input: " + err.Error())
os.Exit(1)
}
if input == "y" {
fmt.Println("[INFO] Running make... (you should use the Makefile, this isn't how you are meant to build eon)")
err := exec.Command("make").Run()
if err != nil {
fmt.Println("[FATAL] Error running make: " + err.Error())
os.Exit(1)
} else {
fmt.Println("[INFO] Shame on you for not using the Makefile.")
fmt.Println("[INFO] If you use this idiotic script in production, don't.")
}
} else {
fmt.Println("[INFO] Shame on you for not using the Makefile.")
fmt.Println("[INFO] If you use this idiotic script in production, don't.")
os.Exit(1)
}
fmt.Println("Run the makefile to build the project, not go build")
}