Loops over sorted array, sort.Sort used as value

59 views
Skip to first unread message

Tong Sun

unread,
Oct 21, 2016, 2:20:38 PM10/21/16
to golang-nuts
Hi, 

How to loop over sorted array?

I got "sort.Sort used as value" error:

Thanks

Jan Mercl

unread,
Oct 21, 2016, 2:25:27 PM10/21/16
to Tong Sun, golang-nuts
sort.Sort has no return value so it cannot be used as an expression, which is what the range clause grammar expects.

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

-j

Roberto Zanotto

unread,
Oct 21, 2016, 2:38:37 PM10/21/16
to golang-nuts

Tong Sun

unread,
Oct 21, 2016, 2:41:03 PM10/21/16
to Roberto Zanotto, golang-nuts
Gotya. 

Thank you both. 

--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/Z-K5jMGjmFg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages