GoShare is a command-line tool written in Golang that allows users to easily share file content with others using a temporary URL.
go-demo-final.mov
To share a file, use the following command:
goshare <file_path>
Replace <file_path>
with the path to the file you want to share.
- Make sure you have NGROK installed on your system.
- Golang
- Git
-
Clone the repository:
git clone https://github.com/sahildotexe/go-code-share.git
-
Navigate to the project directory:
cd go-code-share
-
Build the executable:
go build -o goshare
-
Move the executable to a directory in your system's PATH:
For MacOs/ Linux :
sudo mv goshare /usr/local/bin/
goshare /folder/file.go
The tool will generate an NGROK URL that others can use to access the shared file.
- The tool checks if the user provided a file path.
- It verifies if the file exists.
- Creates a temporary directory and a copy of the file to serve.
- Spawns an NGROK process to expose a local HTTP server.
- Retrieves the NGROK URL.
- Prints the NGROK URL for sharing.
If you find any issues or have suggestions for improvements, feel free to open an issue or create a pull request.