Ensured Day 4 Part 2 cannot run on Windows (that would be cheating!!!!!!)

This commit is contained in:
Logan G 2023-12-05 04:57:25 -07:00
parent a5d25fa317
commit eef1005090
Signed by: logan
GPG key ID: E328528C921E7A7A

View file

@ -1,4 +1,3 @@
// +build linux
package main package main
import ( import (
@ -8,6 +7,7 @@ import (
"os" "os"
"strings" "strings"
"regexp" "regexp"
"runtime"
) )
func find_num_wins(winners string, numbers string) int { func find_num_wins(winners string, numbers string) int {
@ -24,6 +24,10 @@ func find_num_wins(winners string, numbers string) int {
func main() { func main() {
if runtime.GOOS != "linux" {
panic("This is for Linux only.")
}
if len(os.Args) < 2 { if len(os.Args) < 2 {
panic("You did not specify an input file.") panic("You did not specify an input file.")
} }