title: Go printing wierd output
body: <p>When I execute below code in Online Go compiler it works as expected, but when I execute this code in my computer(Golang 1.17.5). It prints weird output.</p>
  <pre><code>package main
  
  import (
      &quot;fmt&quot;
      &quot;os&quot;
  )
  //variables
  var (
      countries = []string{&quot;au&quot;, &quot;in&quot;, &quot;jp&quot;, &quot;kr&quot;, &quot;tr&quot;}
      country   string
  )
  //main function
  func main() {
      if len(os.Args) &lt; 2 {
          fmt.Printf(&quot;country code : &quot;)
          fmt.Scanf(&quot;%s&quot;, &amp;country)
          checkcountry(&amp;country)
  
          // log.Printf(&quot;&quot;)
      } else {
          checkcountry(&amp;country)
  
      }
  
  }
  </code></pre>
  <p>//check whether the entered string is in countries string_array</p>
  <pre><code>func checkcountry(country *string) {
  
      for 1 == 1 {
  
          if is_string_in_array(*country, countries) {
              fmt.Printf(&quot;country : %s, breaking\n&quot;, *country)
              break
          } else {
              fmt.Printf(&quot;country code : &quot;)
              fmt.Scanf(&quot;%s&quot;, country)
          }
      }
  
  }
  </code></pre>
  <pre><code>func is_string_in_array(str string, array []string) bool {
      for _, i := range array {
          if str == i {
              return true
          }
      }
      return false
  }
  </code></pre>
  <p>repl.it terminal output :</p>
  <pre><code>go run main.go
  country code : dd
  country code : 
  </code></pre>
  <p>my terminal output :</p>
  <pre><code>go run main.go
  country code : dd
  country code : country code :
  </code></pre>