5 ms·
Not sure what you mean but it seems to work for me https://play.golang.org/p/U9Uuy-_sdjn https://play.golang.org/p/U9Uuy-_sdjn
by smnscu 9y ago
Not sure what you mean but it seems to work for me
https://play.golang.org/p/U9Uuy-_sdjn https://play.golang.org/p/U9Uuy-_sdjn
- tapirl 9y ago"[]string(nil)" is more verbose than "nil".
- AnIdiotOnTheNet 9y agoSeriously? That's your problem with this construct that otherwise does exactly what you asked for?
- tapirl 9y agoIt is easy for compilers to deduce the type of the nil in "append(nil, data[:2]...)".
- AnIdiotOnTheNet 9y agoSure, and it might just in a future version of the spec if there isn't a good reasoning for not doing that. Doesn't mean that "it's more characters!" isn't still a really silly complaint.