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
+6.1k nginx : force all pages to be SSL
+7.9k Setting $GOPATH environment variable for Unix/Linux and Windows
+9k Golang : Populate or initialize struct with values example
+7.8k Golang : Getting Echo framework StartAutoTLS to work
+15.2k Golang : Save(pipe) HTTP response into a file
+8.6k Golang : Set or add headers for many or different handlers
+31.5k Golang : bufio.NewReader.ReadLine to read file line by line
+14.3k Golang : Recombine chunked files example
+12.2k Golang : calculate elapsed run time
+19k Golang : Padding data for encryption and un-padding data for decryption
+41.4k Golang : Convert string to array/slice
+9.1k Golang : Simple histogram example