Golang container/list.List.Back() function example
package container/list
Back returns the last element of list l or nil.
Golang container/list.List.Back() 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.Back()
fmt.Println(e.Value)
}
Output :
c
Reference :
Advertisement
Something interesting
Tutorials
+33k Golang : How to check if a date is within certain range?
+6.1k Golang : Debug with Godebug
+27.2k Golang : Find files by name - cross platform example
+7k Golang : constant 20013 overflows byte error message
+8.8k Yum Error: no such table: packages
+12.1k Golang : Perform sanity checks on filename example
+14.5k How to automatically restart your crashed Golang server
+7.4k Linux : How to fix Brother HL-1110 printing blank page problem
+17.7k Golang : [json: cannot unmarshal object into Go value of type]
+7.3k Golang : Calculate how many weeks left to go in a given year
+5.5k Golang : Stop goroutine without channel
+26.8k Golang : Find files by extension