Skip to content

Remotely download and run the latest version of your app with Go.

Notifications You must be signed in to change notification settings

HashimTheArab/go-remote-download

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Remote Downloader

This repository contains a Go program that allows you to download the latest version of a file (gophertunnel.exe) from a remote source and run it. The program provides a simple interface to download the latest version and run it.

Features

  • Download Latest Version: Press d to download the latest version from the specified URL.
  • Run the File: Press r to run the downloaded file.

Usage

  1. Clone the Repository:

    git clone https://github.com/HashimTheArab/go-remote-download.git
    cd go-remote-download
  2. Build the Program:

    go build -o go-remote-download main.go
    1. Host Your File on GitHub:
    • Upload your exe file to your GitHub repository.

    • Go to the file in your repository on GitHub.

    • Click on the Raw button to get the URL for the raw file. It should look like this:

      https://raw.githubusercontent.com/username/repository/branch/path/to/file.exe
      
  3. Update the Download URL in the Program:

    • Open main.go in your preferred text editor.
    • Replace the url constant with the raw URL of your file:
    const url = "https://raw.githubusercontent.com/username/repository/branch/path/to/file.exe"
    const name = "file.exe"
  4. Build the Program:

    go build -o go-remote-download main.go
  5. Run the Program:

    ./go-remote-download

    The program will prompt you to either download the latest version or run the file:

    Gophertunnel Remote Downloader
    Press 'd' to download the latest version or 'r' to run it:
    
    • Press d to download the latest version of your file.
    • Press r to run the downloaded version.

Requirements

  • Go 1.21 or higher

Configuration

The download URL and file name are defined as constants in the program. You can modify these values as needed:

const url = "https://raw.githubusercontent.com/HashimTheArab/go-remote-download/main/gophertunnel.exe"
const name = "gophertunnel.exe"

This README was generated by ChatGPT 4o.

About

Remotely download and run the latest version of your app with Go.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages