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
+13.6k Golang : Set image canvas or background to transparent
+31.1k Golang : Calculate percentage change of two values
+13.3k Golang : Linear algebra and matrix calculation example
+17.9k Golang : How to make a file read only and set it to writable again?
+18.8k Golang : How to make function callback or pass value from function as parameter?
+13.9k Golang : How to check if a file is hidden?
+24.6k Golang : How to validate URL the right way
+37.5k Golang : Converting a negative number to positive number
+4.1k Javascript : Empty an array example
+13.4k Golang : Read from buffered reader until specific number of bytes
+8.1k Golang : Variadic function arguments sanity check example
+16.5k Golang : Check if a string contains multiple sub-strings in []string?