package main
import (
"fmt"
"os"
)
func main() {
if len(os.Args) >= 2 && os.Args[2] == "-l" {
fmt.Println("-l")
}
}
What's wrong with logical AND expression? It should've evaluate left part (
len(os.Args) >= 2) to "false" and exit...
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.