mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
287 B
22 lines
287 B
5 years ago
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
safeWords := []string{"01", "galaxy", "galaxy 01"}
|
||
|
count := 0
|
||
5 years ago
|
for _, arg := range os.Args[1:] {
|
||
5 years ago
|
for _, s := range safeWords {
|
||
5 years ago
|
if s == arg {
|
||
5 years ago
|
count++
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if count == 1 || count == 2 {
|
||
|
fmt.Println("Alert!!!")
|
||
|
}
|
||
|
}
|