> i want to send a value over the network via websocket.
>
> the value is float64 and must be converted to []uint8 .
You can access the bit pattern using math.Float64bits().
there is the package strconv that is a good helper.
value := math.Sin(3.) // this is my float64 value
msg := strconv.Ftoa64(value, 'g', 10) // conversion to string
out := []byte(msg) // conversion to []byte // final conversion to []byte