An open API service indexing awesome lists of open source software.

https://github.com/hashimthearab/go-remote-download

Remotely download and run the latest version of your app with Go.
https://github.com/hashimthearab/go-remote-download

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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**:

```bash
git clone https://github.com/HashimTheArab/go-remote-download.git
cd go-remote-download
```

2. **Build the Program**:

```bash
go build -o go-remote-download main.go
```

2. **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:

```go
const url = "https://raw.githubusercontent.com/username/repository/branch/path/to/file.exe"
const name = "file.exe"
```

4. **Build the Program**:

```bash
go build -o go-remote-download main.go
```

5. **Run the Program**:

```bash
./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:

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

This README was generated by ChatGPT 4o.