You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: 841. Keys and Rooms.go
    path of file: ./repos/LeetCode-Go/leetcode/0841.Keys-and-Rooms
    
    the code of the file until where you have to start completion: package leetcode

func canVisitAllRooms(rooms [][]int) bool {
	visit
    
func dfsVisitAllRooms(es [][]int, visited map[int]bool, from int) {
	for _, to := range es[from] {
		if visited[to] {
			continue
		}
		visited[to] = true
		dfsVisitAllRooms(es, visited, to)
	}
}