Skip to content

GoShare is a command-line tool written in Golang that allows users to easily share file content with others using a temporary URL.

Notifications You must be signed in to change notification settings

sahildotexe/go-code-share

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GoShare

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

Usage

To share a file, use the following command:

goshare <file_path>

Replace <file_path> with the path to the file you want to share.

Prerequisites

  • Make sure you have NGROK installed on your system.
  • Golang
  • Git

Installation

  1. Clone the repository:

    git clone https://github.com/sahildotexe/go-code-share.git
  2. Navigate to the project directory:

    cd go-code-share
  3. Build the executable:

    go build -o goshare
  4. Move the executable to a directory in your system's PATH:

    For MacOs/ Linux :

    sudo mv goshare /usr/local/bin/

Example

goshare /folder/file.go

The tool will generate an NGROK URL that others can use to access the shared file.

How It Works

  1. The tool checks if the user provided a file path.
  2. It verifies if the file exists.
  3. Creates a temporary directory and a copy of the file to serve.
  4. Spawns an NGROK process to expose a local HTTP server.
  5. Retrieves the NGROK URL.
  6. Prints the NGROK URL for sharing.

Contributing

If you find any issues or have suggestions for improvements, feel free to open an issue or create a pull request.

About

GoShare is a command-line tool written in Golang that allows users to easily share file content with others using a temporary URL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages