Ensured Day 4 Part 2 cannot run on Windows (that would be cheating!!!!!!)
This commit is contained in:
parent
a5d25fa317
commit
eef1005090
1 changed files with 5 additions and 1 deletions
|
@ -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.")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue