Converting string input to float64 using ParseFloat in Golang
<p>I've just started learning Go and I'm trying to convert a string from standard input to a float64 so I can perform an arithmetic operation on the input value.</p>

<p>The output returns "0 feet converted to meters gives you 0 meters" regardless of the input value. I can't figure out why the value is zero after invoking ParseFloat on the input. </p>

<p>If someone could please point out to me why this is happening, I would greatly appreciate it.</p>

<pre><code>const conversion float64 = 0.3048

func feetToMeters (feet float64) (meters float64) {
  return feet * conversion
}

func main(){
  fmt.Println("\n\nThis program will convert feet to meters for you!\n")

  reader := bufio.NewReader(os.Stdin)
  fmt.Println("Enter feet value: \n")
  feet, _ := reader.ReadString('\n')

  feetFloat, _ := strconv.ParseFloat(feet, 64)

  meters := feetToMeters(feetFloat)

  fmt.Printf("%v feet converted to meters give you %v meters",feetFloat,meters)
}
</code></pre>