Does go-funk have anything to accumulate worths from a network right into a piece in Go? Any kind of collection that has?
I do not wish to apply this myself-
Why do you not wish to apply this on your own? It appears you might simply do this:
func readEverythingFromChannel( ch chan * Something) [] * Something {
somethings:= make([] * Something).
for s:= array ch {
somethings = append( somethings, s).
}
return somethings.
}
Hi @skillian
why create 7 even more lines right into a data, whenever you require to address the exact same trouble? Exists a collection that currently does this?
I think most of us have various viewpoints. From my viewpoint, the concern would certainly be “why depend upon a collection when I can create 7 lines?”
Not to get involved in a debate, yet taking into consideration that in @heidi‘s last article, they claimed:
I assume it could be appropriate to price quote among the Go adages: ” A little duplicating is much better than a little dependence”
That being claimed, I am not familiar with any kind of collection that does this, yet several of the jobs that intend to make Go even more useful may approve a PUBLIC RELATIONS. In Go 1.18 and also later on, you might develop your very own bundle and also placed a common variation of the code I place above and after that reference it from your various other jobs to ensure that you do not need to create it once more.
There are advantages and disadvantages to both alternatives. I assume this is a place where each designer, or group chooses its very own on a situation by instance scenario.
Anyways, what is the service? I had expect go-funk yet without a doubt it appears that it can refrain this.
Is the writer of go-funk analysis this online forum? I might provide you a hand.