title: How to convert type in golang?
body: <p>I need to hid a password.
  I get (mismatched types <code>[]byte</code> and <code>int</code>).
  How can i fix it? How can I convert from <code>int</code> to <code>[]byte</code>?</p>
  
  <pre><code>package main
  
  import ("fmt"; "github.com/howeyc/gopass")
  
  func main() {
      var user string
      maping := map[string]int{"dasha": 123, "mike": 777}
  
      fmt.Println("Enter username: ")
      fmt.Scan(&amp;user)
      fmt.Printf("Enter password: ")
      pass, err := gopass.GetPasswd()
      if err != nil {
          return
      }
      if pass == maping[user] {
          fmt.Println("bingo")
      }else{
          fmt.Println("the login or password is not correct")
      }
  }
  </code></pre>