https://github.com/keygen-sh/example-go-license-validation
An example of making a simple license validation request from a Go command line program
https://github.com/keygen-sh/example-go-license-validation
example-code license-activation license-keys license-validation software-licensing
Last synced: 5 months ago
JSON representation
An example of making a simple license validation request from a Go command line program
- Host: GitHub
- URL: https://github.com/keygen-sh/example-go-license-validation
- Owner: keygen-sh
- License: mit
- Archived: true
- Created: 2021-03-08T18:39:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-05T20:25:29.000Z (almost 4 years ago)
- Last Synced: 2025-09-16T06:59:57.981Z (9 months ago)
- Topics: example-code, license-activation, license-keys, license-validation, software-licensing
- Language: Go
- Homepage: https://keygen.sh
- Size: 1.95 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Example Go License Validation
This is an example Go program for validating a license key. It contains a
small command line program which prompts for a license key value and then
validates the key using Keygen's software licensing API.
This repo is being archived. See our [Go SDK](https://github.com/keygen-sh/keygen-go) instead.
## Running the example
First up, configure a couple environment variables:
```bash
# Your Keygen account ID
export KEYGEN_ACCOUNT_ID="YOUR_KEYGEN_ACCOUNT_ID"
```
You can either run each line above within your terminal session before
starting the app, or you can add the above contents to your `~/.bashrc`
file and then run `source ~/.bashrc` after saving the file.
Next, install dependencies with [`go mod`](https://blog.golang.org/using-go-modules):
```
go install
```
Then run the program:
```
go run main.go
```
## Questions?
Reach out at [support@keygen.sh](mailto:support@keygen.sh) if you have any
questions or concerns!