https://github.com/mpapenbr/goirsdk
Go implementation for the iRacing Telemetry API
https://github.com/mpapenbr/goirsdk
golang golang-module iracing iracing-api windows
Last synced: 4 months ago
JSON representation
Go implementation for the iRacing Telemetry API
- Host: GitHub
- URL: https://github.com/mpapenbr/goirsdk
- Owner: mpapenbr
- License: mit
- Created: 2023-06-14T15:07:02.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-05-10T08:47:50.000Z (about 1 year ago)
- Last Synced: 2025-05-10T09:30:51.280Z (about 1 year ago)
- Topics: golang, golang-module, iracing, iracing-api, windows
- Language: Go
- Homepage:
- Size: 91.8 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# goirsdk
[][github-actions]
[](https://github.com/securego/gosec)
[][dependabot-pulls]
[][github-releases]
[][project-license]
[][gomod-file]
Go module for iRacing Telemetry API access
## Sample usage
Start the iRacing simulator and wait until the simulation is up and running.
```console
cd sample
go run sample.go
```
The [sample] connects to the iRacing telemetry data and prints out the iRacing session time every second.
See [variables] for an overview of available telemetry data
## Initial Setup
This section is intended to help developers and contributors get a working copy of
`goirsdk` on their end
Clone this repository
```sh
git clone https://github.com/mpapenbr/goirsdk
cd goirsdk
```
Option: Do you own setup
Install `golangci-lint` from the [official website][golangci-install] for your OS
## Local Development
This section will guide you to setup a fully-functional local copy of `goirsdk`
on your end and teach you how to use it! Make sure you have installed
[golangci-lint][golangci-install] before following this section!
**Note:** This section relies on the usage of [Makefile][makefile-official]. If you
can't (or don't) use Makefile, you can follow along by running the internal commands
from [`goirsdk's` Makefile][makefile-file] (most of which are
OS-independent)!
### Installing dependencies
To install all dependencies associated with `goirsdk`, run the
command
```sh
make install
```
### Using Code Formatters
Code formatters format your code to match pre-decided conventions. To run automated code
formatters, use the Makefile command
```sh
make codestyle
```
### Using Code Linters
Linters are tools that analyze source code for possible errors. This includes typos,
code formatting, syntax errors, calls to deprecated functions, potential security
vulnerabilities, and more!
To run pre-configured linters, use the command
```sh
make lint
```
## Additional Resources
### Makefile help
Tap for a list of Makefile commands
| Command | Description | Prerequisites |
| :-----: | :-----------------------------------------------------------------: | :-----------: |
| `help` | Generate help dialog listing all Makefile commands with description | NA |
| `install` | Fetch project dependencies | NA |
| `codestyle` | Run code-formatters | golangci-lint |
| `lint` | Check codestyle and run linters | golangci-lint |
Optionally, to see a list of all Makefile commands, and a short description of what they
do, you can simply run
```sh
make
```
Which is equivalent to;
```sh
make help
```
Both of which will list out all Makefile commands available, and a short description
of what they do!
## Releases
You can check out a list of previous releases on the [Github Releases][github-releases]
page.
### Semantic versioning with Release Drafter
What is Semantic Versioning?
Semantic versioning is a versioning scheme aimed at making software management easier.
Following semantic versioning, version identifiers are divided into three parts;
```sh
..
```
> MAJOR version when you make incompatible API changes [breaking changes]
> MINOR version when you add functionality in a backwards compatible manner [more features]
> PATCH version when you make backwards compatible bug fixes [bug fixes and stuff]
For a more detailed description, head over to [semver.org][semver-link]
[Release Drafter][release-drafter] automatically updates the release version as pull
requests are merged.
Labels allowed;
- `major`: Affects the `` version number for semantic versioning
- `minor`, `enhancement`, `update`, `feature`: Affects the `` version number for semantic versioning
- all other labels affect the `` version number
Whenever a pull request with one of these labels is merged to the `master` branch,
the corresponding version number will be bumped by one digit!
### List of Labels
Pull requests once merged, will be classified into categories by
[release-drafter][release-drafter] based on pull request labels
This is managed by the [`release-drafter.yml`][release-drafter-config] config file.
| **Label** | **Title in Releases** |
| :-----------------------------------------------------: | :-----------------------------: |
| `security` | :lock: Security |
| `enhancement`, `feature`, `update` | :rocket: Updates |
| `bug`, `bugfix`, `fix` | :bug: Bug Fixes |
| `documentation`, `docs` | :memo: Documentation |
| `wip`, `in-progress`, `incomplete`, `partial`, `hotfix` | :construction: Work in Progress |
| `dependencies`, `dependency` | :package: Dependencies |
| `refactoring`, `refactor`, `tests`, `testing` | :test_tube: Tests and Refactor |
| `build`, `ci`, `pipeline` | :robot: CI/CD and Pipelines |
The labels `bug`, `enhancement`, and `documentation` are automatically created by Github
for repositories. [Dependabot][dependabot-link] will implicitly create the
`dependencies` label with the first pull request raised by it.
The remaining labels can be created as needed!
## Credits
`goirsdk` is powered by a template generated using [`cookiecutter-go`][cookiecutter-go-link] which is based on [`go-template`][go-template-link]
[][cookiecutter-go-link]
[][go-template-link]
[makefile-file]: ./Makefile
[project-license]: ./LICENSE
[github-actions]: ../../actions
[github-releases]: ../../releases
[precommit-config]: ./.pre-commit-config.yaml
[gomod-file]: ../main/go.mod
[github-actions-tests]: ../../actions/workflows/tests.yml
[dependabot-pulls]: ../../pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Aapp%2Fdependabot
[semver-link]: https://semver.org
[pre-commit]: https://pre-commit.com
[github-repo]: https://github.com/new
[gitlab-repo]: https://gitlab.com/new
[dependabot-link]: https://dependabot.com
[githooks]: https://git-scm.com/docs/githooks
[goreleaser]: https://goreleaser.com/intro/
[python-install]: https://www.python.org/downloads
[release-drafter-config]: ./.github/release-drafter.yml
[makefile-official]: https://www.gnu.org/software/make
[pip-install]: https://pip.pypa.io/en/stable/installation
[codecov-docs]: https://docs.codecov.com/docs#basic-usage
[go-template-link]: https://github.com/notsatan/go-template
[golangci-install]: https://golangci-lint.run/usage/install
[cookiecutter-link]: https://github.com/cookiecutter/cookiecutter
[cookiecutter-go-link]: https://github.com/mpapenbr/cookiecutter-go
[release-drafter]: https://github.com/marketplace/actions/release-drafter
[creating-secrets]: https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository
[linting-golang]: https://freshman.tech/linting-golang/
[sample]: ./examples/sample.go
[variables]: ./variables.md