Golang container/list.Element.Next() function example
package container/list
Next returns the next list element or nil.
Golang container/list.Element.Next() function usage example
package main
import (
"container/list"
"fmt"
)
func main() {
alist := list.New()
alist.PushBack("a")
alist.PushBack("b")
alist.PushBack("c")
fmt.Println("Next")
for e := alist.Front(); e != nil; e = e.Next() {
fmt.Println(e.Value) // print out the elements
}
}
Output :
Next
a
b
c
Reference :
Advertisement
Something interesting
Tutorials
+9.3k Golang : Temperatures conversion example
+20.9k PHP : Convert(cast) int to double/float
+6.2k Golang : Extract XML attribute data with attr field tag example
+14.2k Elastic Search : Mapping date format and sort by date
+11.7k Golang : Calculations using complex numbers example
+12.3k Golang : Get month name from date example
+8.1k Golang : Multiplexer with net/http and map
+12.4k Golang : Extract part of string with regular expression
+13.9k Golang : convert(cast) string to float value
+9.9k Golang : Turn string or text file into slice example
+6.3k Golang : Detect face in uploaded photo like GPlus
+13.8k Generate salted password with OpenSSL example