FAQ
Since empty slices are different than nil slices you can use them in your API. Once I used the pattern of returning 'nil' to represent EOF and an empty slice to represent 'the pipe isn't closed by no data was sent recently'.

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 6 of 11 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMay 17, '15 at 11:51p
activeMay 21, '15 at 7:42a
posts11
users6
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase