eolibgo

package module
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2023 License: MIT Imports: 0 Imported by: 0

README

eolib-go

Core library for writing Endless Online applications using the Go programming language.

Usage

Referencing the package

The library may be referenced in a project via go get:

go get github.com/ethanmoffat/eolib-go@v1.1.2
Sample code

A sample server skeleton using eolib-go is available here.

Development Environment

Installing go

Development was done using go 1.20.5 on Ubuntu Linux. Development on Windows is untested.

gvm is recommended as a mechanism to manage installations of different versions of go.

To set up gvm on Linux using bash:

bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
source $HOME/.gvm/scripts/gvm

The source command may be added to your ~/.bash_profile so gvm is available in all login shells.

echo "source $HOME/.gvm/scripts/gvm" >> ~/.bash_profile

Once gvm is installed and sourced, use the following commands to install and use go 1.20.5:

gvm install go1.20.5 -B
gvm use go1.20.5

The gvm use command is required on each subsequent terminal or session in which go commands must be run.

VSCode setup

If go is installed via gvm, you must update your $GOROOT variable to point at it, or VSCode won't be able to find the go binary.

Get the path to the GOROOT via go env:

~ [ethan@BEASTMODE] $  gvm use go1.20.5
Now using version go1.20.5
~ [ethan@BEASTMODE] $  go env GOROOT
/home/ethan/.gvm/gos/go1.20.5

In VSCode, search for the GOROOT setting and update the path to point at this version of go.

Note that a gvm extension exists for VSCode but it is out of date and no longer functions properly.

Building the code

A Makefile is provided to ease the process of building, testing, and code generation. Use make help to see all available targets. Running make by itself should be enough for most uses. make test is also available to run all tests.

Building the library on Windows is left as an exercise to the reader.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
internal
xml
pkg
eolib/data
Packate data provides utilities to read and write EO data types.
Packate data provides utilities to read and write EO data types.
eolib/encrypt
Package encrypt provides utilities to handle EO data encryption.
Package encrypt provides utilities to handle EO data encryption.
eolib/packet
Package packet provides utilities for EO packets.
Package packet provides utilities for EO packets.
eolib/protocol
Package protocol provides EO protocol data structures.
Package protocol provides EO protocol data structures.
eolib/protocol/map
Package eomap provides EO map data structures.
Package eomap provides EO map data structures.
eolib/protocol/net
Package net provides EO network protocol data structures.
Package net provides EO network protocol data structures.
eolib/protocol/net/client
Package client provides EO network protocol data structures.
Package client provides EO network protocol data structures.
eolib/protocol/net/server
Package server provides EO network protocol data structures.
Package server provides EO network protocol data structures.
eolib/protocol/pub
Package net provides EO pub file data structures.
Package net provides EO pub file data structures.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL