title: About unused variable in golang
body: <p>why if we append data in slice and not use it (variable mySlice in the program), why not throw the error message &quot;unused variable&quot; golang. Thankyou</p>
  <p>#example</p>
  <pre><code> var mySlice []string
  
   mySlice = append(mySlice,&quot;halo&quot;)
  </code></pre>
  <p>and same behaviour with map</p>
  <p>#example</p>
  <pre><code>var my = map[string]int{}
  
  my[&quot;tes&quot;]=1
  </code></pre>