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: 830. Positions of Large Groups.go
    path of file: ./repos/LeetCode-Go/leetcode/0830.Positions-of-Large-Groups
    
    the code of the file until where you have to start completion: package leetcode

func largeGroupPositions(S string) [][]int {
	res, end := [][]int{}, 0
	for end < len(S) {
		start, str := end, S[end]
		for end < len(S) && S[end] == str {
			end++
		}
		if end-start >= 3 {
			res = append(res, []int
    
func largeGroupPositions(S string) [][]int {
	res, end := [][]int{}, 0
	for end < len(S) {
		start, str := end, S[end]
		for end < len(S) && S[end] == str {
			end++
		}
		if end-start >= 3 {
			res = append(res, []int{start, end - 1})
		}
	}
	return res
}