title: How do I compare strings in GoLang?
body: <p>I am unable to produce a 'true' result when it comes to Go string comparison. I wrote the following to explain the issue and attached a screenshot of the output</p>
  
  <pre><code>// string comparison in Go
  package main
  import "fmt"
  import "bufio"
  import "os"
  
  func main() {
      var isLetterA bool 
  
      fmt.Println("Enter the letter a")
      reader := bufio.NewReader(os.Stdin)
      input, _ := reader.ReadString('\n')
  
      if(input == "a") {
          isLetterA = true
      } else {
          isLetterA = false 
      }
  
      fmt.Println("You entered",input)
      fmt.Println("Is it the letter a?",isLetterA)
  
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/eiGMI.png" rel="noreferrer"><img src="https://i.stack.imgur.com/eiGMI.png" alt="example"></a></p>