title: golang file name too long error when reading from os.Args[1]
body: <p>I'm new to golang and using <code>ioutil.ReadFile(os.Args[1])</code> to fetch a file path from the cli and then processing each line using:</p>
  <pre><code>package main
  
  import (
      &quot;bufio&quot;
      &quot;fmt&quot;
      &quot;log&quot;
      &quot;os&quot;
  )
  
  func main()  {
      
      file, err := os.Open(os.Args[1])
      if err != nil {
          log.Fatal(err)
      }
      defer file.Close()
  
      scanner := bufio.NewScanner(file)
      for scanner.Scan() {
          fmt.Println(scanner.Text())
      }
  
      if err := scanner.Err(); err != nil {
          log.Fatal(err)
      }
  }
  </code></pre>
  <p>Now I can get the output at stdout. But also get the following ERROR in the end:</p>
  <pre><code>msg:&quot;BRUMBRUM&quot;;reference:cve,CVE-2007-2810;reference:blah;
  msg:&quot;WAKANDA&quot;;reference:cve,CVE-2007-2810;reference:blah; file name too long
  exit status 1
  </code></pre>
  <p>My file path input is <code>data/srulz.tcl</code>
  . FYI, the error message is not a part of the text file.</p>
  <p>I need to know where is this going wrong here and how can this be improved?</p>
  <blockquote>
  <p>UPDATE:</p>
  <p><b>Provided issue reproducible code.</b></p>
  <p>Go-ing with flag pkg for now until this mystery is solved</p>
  </blockquote>