Minecraft is a collection of SemVer-versioned Minecraft libraries written in Go. At the time of writing it contains the following Go packages:
profile
, a binding for querying the public Mojang API for Minecraft profiles, supporting:- Lookup based on either Minecraft username or ID.
- Fetching ID, current username, skin textures and history of prior usernames.
versions
, a small package for fetching Mojang's listing of Minecraft versions and working with the reported version information; includes release dates of both official releases and the latest development snapshots.
Examples of usage can be found on the GoDoc reference pages linked above.
Use go get
to download the packages to your workspace or update them:
$ go get -u github.com/PhilipBorgesen/minecraft/...
Use go test
to run the entire test suite incl. integration tests:
$ go test -tags=integration github.com/PhilipBorgesen/minecraft/...
The project has been used by the author to learn Go. With that said, it is not perfect:
- Tests cannot be run in parallel due to dependence on global client variables.
profile.ErrMaxSizeExceeded
should have been namedMaxSizeExceededError
to adhere to naming conventions. As an underlying design issue it did not need to be a type, a single error value would have been sufficient.
The project is licensed under the MIT License - see LICENSE file for details.