title: GO reading last line
body: <p>i have a console input  </p>
  
  <pre><code>b a 
  c b 
  c a 
  c c 
  c F
  </code></pre>
  
  <p>and i am reading it like following:</p>
  
  <pre><code>wtf:=make([]string,5)
  reader := bufio.NewReader(os.Stdin)
  for i:=0;i&lt;5;i++{
          line, _ := reader.ReadString('\n')
          wtf[i]=line
      }
  </code></pre>
  
  <p>But, i am not reading the last line because it has no '\n'
  so i've added the following code </p>
  
  <pre><code>var kek string
  kek=""
  for i:=0;i&lt;2;i++{
      line, _:=reader.ReadString(' ')
      kek+=line
      }
  </code></pre>
  
  <p>Now in <code>wtf</code> are stored first 4 lines and in <code>kek</code> is the last one.
  Now i want <code>kek</code> to be 4-th element of <code>wtf</code>. As i can understand, <code>wtf</code> is a slice, so there should be no problem for doing this:</p>
  
  <pre><code>wtf[5-1]=kek
  </code></pre>
  
  <p>BUT that's not working, i am getting this output for <code>wtf</code>:</p>
  
  <pre><code>[
  b a
  c b
  c a
  c F
  ]
  </code></pre>
  
  <p>And if i check <code>wtf</code>'s len it would be still 5! </p>
  
  <p>P.S. Total number of lines and symbols to read in it are given, so digits 5 and 2 could be replaced for n and m.</p>