Golang solution
func lengthOfLongestSubstring(str string) int {\n    \tm, max, left := make(map[rune]int), 0, 0\n    \tfor idx, c := range str {\n    \t\tif _, okay := m[c]; ok
    func lengthOfLongestSubstring(str string) int {\n    \tm, max, left := make(map[rune]int), 0, 0\n    \tfor idx, c := range str {\n    \t\tif _, okay := m[c]; okay == true && m[c] >= left {\n    \t\t\tif idx-left > max {\n    \t\t\t\tmax = idx - left\n    \t\t\t}\n    \t\t\tleft = m[c] + 1\n    \t\t}\n    \t\tm[c] = idx\n    \t}\n    \tif len(str)-left > max {\n    \t\tmax = len(str) - left\n    \t}\n    \treturn max\n    }
['Go']