Go solution
\nfunc lengthOfLongestSubstring(s string) int {\n    start := 0\n    longest := 0\n    used := map[byte]int{}\n    \n    for i := 0; i < len(s); i++ {\n        
```\nfunc lengthOfLongestSubstring(s string) int {\n    start := 0\n    longest := 0\n    used := map[byte]int{}\n    \n    for i := 0; i < len(s); i++ {\n        c := s[i]\n        \n        if _, ok := used[c]; ok && used[c] >= start {\n            start = used[c] + 1\n        }\n        \n        longest = max(longest, i - start + 1)\n        used[c] = i\n    }\n    \n    return longest\n}\n\nfunc max(a, b int) int {\n    if a > b {\n        return a\n    }\n    \n    return b\n}\n```
['Go']