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
+5.5k Golang : If else example and common mistake
+5.2k Golang : Issue HTTP commands to server and port example
+12.2k Golang : Detect user location with HTML5 geo-location
+3.7k Golang : Switch Redis database redis.NewClient
+13.2k Golang : How to calculate the distance between two coordinates using Haversine formula
+20.2k Golang : How to get struct tag and use field name to retrieve data?
+12.4k Golang : Encrypt and decrypt data with x509 crypto
+31.7k Golang : How to convert(cast) string to IP address?
+7.9k Golang : Ways to recover memory during run time.
+9.8k Golang : Qt get screen resolution and display on center example
+6.3k Golang : Detect face in uploaded photo like GPlus
+16.3k Golang : convert string or integer to big.Int type