Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

A self-updating Go program that uses Keygen for licensing and auto-updates.

License

Notifications You must be signed in to change notification settings

keygen-sh/example-go-program

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Self-Updating Go Program

The following is a self-updating program written in Go that showcases how to use Keygen for licensing and how to implement auto-update functionality within a command line program using Keygen Dist.

image

Compiling

First up, install dependencies with dep:

dep ensure

To compile for your operating system, simply run the following from the root of the project directory:

go build

To compile for all platforms using gox, run the following:

gox -output "dist/v1.x.x/{{.OS}}-{{.Arch}}/{{.Dir}}"

Prebuilt-binaries

You can download pre-built binaries for 64bit operating systems. The pre-built binaries are of v1.0.0, so you will still be able to test auto-update functionality.

Testing licensing

Below is a list of license keys you can use to test program functionality.

Key Validity
val-key Valid
sus-key Suspended
exp-key Expired

Testing updates

Enter a valid license key and when available, press ctrl+u to install the update from v1.0.0 to v1.0.1. It will download the update, and then replace the current executable with the updated one. You can then rerun the program to use the newly updated version.

Questions?

Reach out at support@keygen.sh if you have any questions or concerns!

Releases

No releases published

Packages

No packages published

Languages