tools

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: MIT Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Helper functions for reading/writing data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFile

func ReadFile(filePath string) string

func ReadMapOrNil

func ReadMapOrNil(filePath string) map[string]string

func ReadWeb

func ReadWeb(url string) (string, error)

Fetches web results a single url, and returns the page contents as a string.

func ReadWebMulti

func ReadWebMulti(urls []string) []string

Fetches web results from all the given urls, and returns a parallel array of page contents.

func ReadWebMultiMap

func ReadWebMultiMap[K comparable](keys []K, keyToUrl func(K) string) map[K]string

Like ReadWebMulti, but uses a lambda function for converting keys --> urls and returns a map of keys to web contents.

func ReadWebRequired

func ReadWebRequired(url string) string

func WriteFile

func WriteFile(filePath string, content string)

func WriteFileLines

func WriteFileLines(filePath string, lines []string)

func WriteMapCustomSort

func WriteMapCustomSort(filePath string, contents map[string]string, sortFunc func(a, b string) int)

func WriteMapSortByIntKey

func WriteMapSortByIntKey(filePath string, contents map[string]string)

func WriteProtoArrayToBuffer

func WriteProtoArrayToBuffer[T googleProto.Message](arr []T, buffer *bytes.Buffer, name string)

Types

This section is empty.

Directories

Path Synopsis
buffmanifest
Package buffmanifest is the checked-in manifest of every raid, party, individual and enemy-debuff proto field the sim knows about.
Package buffmanifest is the checked-in manifest of every raid, party, individual and enemy-debuff proto field the sim knows about.
dbc
gen_db command
gen_spelldata command
Regenerates the spell store, sim/<class>/spell_data_auto_gen.go, the hunter's pet_families_auto_gen.go and ammo_auto_gen.go, and the raid buffs from the game files database.
Regenerates the spell store, sim/<class>/spell_data_auto_gen.go, the hunter's pet_families_auto_gen.go and ammo_auto_gen.go, and the raid buffs from the game files database.
overrides
Package overrides holds the numbers the spelldata store carries that the game files do not state.
Package overrides holds the numbers the spelldata store carries that the game files do not state.
db2tool extracts data from the World of Warcraft game files into tools/database/wowsims.db.
db2tool extracts data from the World of Warcraft game files into tools/database/wowsims.db.
config
Package config binds the db2tool settings files, tools/database/ generator-settings.json and ptr-generator-settings.json.
Package config binds the db2tool settings files, tools/database/ generator-settings.json and ptr-generator-settings.json.
dbd
Package dbd parses WoWDBDefs .dbd definition files and selects the version block matching an exact build number.
Package dbd parses WoWDBDefs .dbd definition files and selects the version block matching an exact build number.
sqlite
Package sqlite writes the extracted tables to wowsims.db: the schema (one table per .dbd definition, arrays as JSON text plus generated per-element columns) and the row inserts.
Package sqlite writes the extracted tables to wowsims.db: the schema (one table per .dbd definition, arrays as JSON text plus generated per-element columns) and the row inserts.
tact
Package tact reads World of Warcraft game files either out of a local CASC install (.build.info picks the build, then root → encoding → .idx → data.NNN → BLTE resolves a file data id to its bytes) or straight off Blizzard's CDN (see cdn.go), which swaps the .idx/data.NNN step for archive indexes and range reads.
Package tact reads World of Warcraft game files either out of a local CASC install (.build.info picks the build, then root → encoding → .idx → data.NNN → BLTE resolves a file data id to its bytes) or straight off Blizzard's CDN (see cdn.go), which swaps the .idx/data.NNN step for archive indexes and range reads.
wdc
Package wdc decodes WDC5 .db2 game files tables into rows shaped by a .dbd definition, and overlays the game files' XFTH DBCache hotfix records onto them.
Package wdc decodes WDC5 .db2 game files tables into rows shaped by a .dbd definition, and overlays the game files' XFTH DBCache hotfix records onto them.
Command gen_buffs_proto renders proto/buffs.proto from tools/database/buffmanifest.
Command gen_buffs_proto renders proto/buffs.proto from tools/database/buffmanifest.
Command gen_highs syncs the HiGHS solver artifacts from the npm `highs` package into the repo.
Command gen_highs syncs the HiGHS solver artifacts from the npm `highs` package into the repo.
icons writes the icon of every item, enchant, consumable and spell the database names into assets/icons as <name>.jpg, decoded from the game files' BLP on Blizzard's CDN, and lists the names it wrote in assets/icons/manifest.json.
icons writes the icon of every item, enchant, consumable and spell the database names into assets/icons as <name>.jpg, decoded from the game files' BLP on Blizzard's CDN, and lists the names it wrote in assets/icons/manifest.json.
Starts a language server of the repository for an editor, from the repository root.
Starts a language server of the repository for an editor, from the repository root.
Command spelldata prints one game files spell row the way the store carries it, so a bare id in hand-written code can be read without grepping the generated table.
Command spelldata prints one game files spell row the way the store carries it, so a bare id in hand-written code can be read without grepping the generated table.
launch command
Starts tools/spelldata for an editor, from the repository root, through tools/lsplaunch.
Starts tools/spelldata for an editor, from the repository root, through tools/lsplaunch.
printer
What tools/spelldata prints, for the command and for a server that reads a row in-process.
What tools/spelldata prints, for the command and for a server that reads a row in-process.
run command

Jump to

Keyboard shortcuts

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