Golang check if slice key is present

Golang dose not let you check for a key directly but one method to achieve a similar effect is:

package main

import "fmt"

func main() {
var list []string

list = append(list, "first value")
list = append(list, "second value")
list = append(list, "third value")

if len(list) > 2 {
fmt.Println(list[2])
}
}

This is guaranty that list is 3 entries long, so key 2 exists.