Gehen Sie, um die Konvertierung zu schweben

package main
import "fmt"

func main() {
  
  var intValue int = 2

  // type conversion from int to float
  var floatValue float32 = float32(intValue)
 
  
  fmt.Printf("Integer Value is %d\n", intValue)
  fmt.Printf("Float Value is %f", floatValue)

}
SAMER SAEID