code: func hasPathPrefix(s, pathPrefix string) bool {
  
  	s = strings.TrimSuffix(s, "/")
  	pathPrefix = strings.TrimSuffix(pathPrefix, "/")
  
  	// Short circuit if s doesn't contain the prefix at all
  	if !strings.HasPrefix(s, pathPrefix) {
  		return false
  	}
  
  	pathPrefixLength := len(pathPrefix)
  
  	if len(s) == pathPrefixLength {
  		// Exact match
  		return true
  	}
  
  	if s[pathPrefixLength:pathPrefixLength+1] == "/" {
  		// The next character in s is a path segment boundary
  		// Check this instead of normalizing pathPrefix to avoid allocating on every call
  		// Example where this check applies: s=/foo/bar and pathPrefix=/foo
  		return true
  	}
  
  	return false
  }
docs: // hasPathPrefix returns true if the string matches pathPrefix exactly, or if is prefixed with pathPrefix at a path segment boundary
  // the string and pathPrefix are both normalized to remove trailing slashes prior to checking.