(clientConn *websocket.Conn, path string, isDir bool)
| 123 | } |
| 124 | |
| 125 | func ChangePath(clientConn *websocket.Conn, path string, isDir bool) error { |
| 126 | clientsMu.RLock() |
| 127 | defer clientsMu.RUnlock() |
| 128 | |
| 129 | for conn, clientInfo := range clients { |
| 130 | if conn == clientConn { |
| 131 | clientInfo.Path = path |
| 132 | clientInfo.IsDirectory = isDir |
| 133 | clients[clientConn] = clientInfo |
| 134 | return nil |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | return fmt.Errorf("client not found") |
| 139 | } |
no outgoing calls
no test coverage detected