Golang container/list.List.Front() function example
package container/list
Front returns the first element of list l or nil.
Golang container/list.List.Front() function usage example
package main
import (
"container/list"
"fmt"
)
func main() {
alist := list.New()
alist.PushBack("a")
alist.PushBack("b")
alist.PushBack("c")
e := alist.Front()
fmt.Println(e.Value)
}
Output :
a
Reference :
Advertisement
Something interesting
Tutorials
+10.1k Golang : How to tokenize source code with text/scanner package?
+17.5k Golang : Linked list example
+5.7k List of Golang XML tutorials
+8.8k Golang : HTTP Routing with Goji example
+11.9k Golang : Convert decimal number(integer) to IPv4 address
+8.2k Golang : Metaprogramming example of wrapping a function
+11.3k Golang : Characters limiter example
+8.1k Golang : Append and add item in slice
+10.3k Golang : Wait and sync.WaitGroup example
+5.2k Golang : Customize scanner.Scanner to treat dash as part of identifier
+5.9k Golang : Use NLP to get sentences for each paragraph example
+12.1k Golang : Decompress zlib file example