24 lines
284 B
Go
24 lines
284 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
const version = "1.1.1"
|
||
|
|
||
|
func main() {
|
||
|
if contains(os.Args[1:], "-v") {
|
||
|
fmt.Printf("%s\n", version)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func contains(arrayStr []string, str string) bool {
|
||
|
for _, s := range arrayStr {
|
||
|
if s == str {
|
||
|
return true
|
||
|
}
|
||
|
}
|
||
|
return false
|
||
|
}
|