This is a simple Go application that allows users to search for files in a specified directory. The application run as web application or as a command-line tool.
The user-friendly HTML form where you input your search criteria.
Displays the search results after the user submits the form.
Features
Web Interface:
User-friendly HTML form for input.
Displays search results on a separate results page.
Command-Line Interface (CLI):
Search for files or directories directly from the terminal.
Supports exact name matching.
Setup and Running
Clone the repository:
git clone https://github.com/Vkanhan/filesearcher.git
cd filesearcher
Running as a Web Application:
go run main.go
Access the application:
Open your web browser and go to http://localhost:8080 to access the search form.
Running as a Command-Line Tool:
go run main.go -cli
Example CLI usage
Enter the file name to search for: search_result.png
Enter the directory to search in: D://
Matches found:
D:\Projects\filesearcher\assets\search_result.png
Command-Line Flags
-cli: Enables CLI mode.
-filename: (optional) Specifies the file name to search for directly via the command line.
-directory: (optional) Specifies the directory to search in directly via the command line.