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: 28. Find the Index of the First Occurrence in a String.go
    path of file: ./repos/LeetCode-Go/leetcode/0028.Find-the-Index-of-the-First-Occurrence-in-a-String
    
    the code of the file until where you have to start completion: package leetcode

import "strings"

// 解法一
func strStr(haystack string, needle string) int {

    
func strStr(haystack string, needle string) int {
	for i := 0; ; i++ {
		for j := 0; ; j++ {
			if j == len(needle) {
				return i
			}
			if i+j == len(haystack) {
				return -1
			}
			if needle[j] != haystack[i+j] {
				break
			}
		}
	}
}