utils

package
v0.0.0-...-7ae529c Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BinDir = func() string {
	ex, err := os.Executable()
	Must(err)
	return filepath.Clean(filepath.Dir(ex) + "/")
}()

BinDir returns the path of the executable

Functions

func FormatLevel

func FormatLevel(raw int64) int64

FormatLevel formats the raw level of a character to their actual level

func FormatName

func FormatName(raw string) string

FormatName formats the raw name of a character in the form "example_name" to "Example Name"

func FormatWorld

func FormatWorld(raw string) string

FormatWorld formats the raw world string of a player to their actual world name

func GenerateCA

func GenerateCA(certPath, keyPath string) error

GenerateCA generates a new key pair and saves at the given certPath and keyPath

func GetOutboundIP

func GetOutboundIP() string

GetOutboundIP returns preferred outbound IP of the machine

func Must

func Must(err error)

Must is a panic check for must-fail errors

Types

This section is empty.

Jump to

Keyboard shortcuts

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