How to check for command line arguments in GO : <p>I am writing a program that makes a simple web server in GO. The program should check for a port passed in the command line. If no port is given, I want to panic and exit the program. I thought this should work:</p>

<pre><code>if len(os.Args &lt; 1) {
    panic("No port number given!")
}
</code></pre>

<p>But for some reason it is saying mismatched types []string and int. How can I change this simple if so it works correctly? I am new to GO, so I am sorry if this is a simple question.</p>
