Hello,

as Go provides multi values I would expect that's possible to cast such a
multi value. Do I see it correctly, that Go does not provide it?

Example:

os.ReadFile returns []byte, error.
I want to cast the []byte to a string.

content, err := os.ReadFile(path)

Is it possible to cast the []byte directly to a string without using a
second variable?

Kindly regards

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAEOc3dWn%3Dn%3DFNaQVhnu56yu9yaoVeJRin_m%2B7DNh8hvqV7Ck%2Bw%40mail.gmail.com.

Reply via email to