Documentation
¶
Overview ¶
Helper functions for reading/writing data.
Index ¶
- func ReadFile(filePath string) string
- func ReadMapOrNil(filePath string) map[string]string
- func ReadWeb(url string) (string, error)
- func ReadWebMulti(urls []string) []string
- func ReadWebMultiMap[K comparable](keys []K, keyToUrl func(K) string) map[K]string
- func ReadWebRequired(url string) string
- func WriteFile(filePath string, content string)
- func WriteFileLines(filePath string, lines []string)
- func WriteMapCustomSort(filePath string, contents map[string]string, sortFunc func(a, b string) int)
- func WriteMapSortByIntKey(filePath string, contents map[string]string)
- func WriteProtoArrayToBuffer[T googleProto.Message](arr []T, buffer *bytes.Buffer, name string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadMapOrNil ¶
func ReadWebMulti ¶
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 WriteFileLines ¶
func WriteMapCustomSort ¶
func WriteMapSortByIntKey ¶
func WriteProtoArrayToBuffer ¶
func WriteProtoArrayToBuffer[T googleProto.Message](arr []T, buffer *bytes.Buffer, name string)
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
gen_db
command
|
|
|
db2tool extracts World of Warcraft client data into tools/database/wowsims.db.
|
db2tool extracts World of Warcraft client data 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 files out of a local World of Warcraft CASC install: .build.info picks the build, then root → encoding → .idx → data.NNN → BLTE resolves a file data id to its bytes.
|
Package tact reads files out of a local World of Warcraft CASC install: .build.info picks the build, then root → encoding → .idx → data.NNN → BLTE resolves a file data id to its bytes. |
|
wdc
Package wdc decodes WDC5 .db2 client tables into rows shaped by a .dbd definition, and overlays the client's XFTH DBCache hotfix records onto them.
|
Package wdc decodes WDC5 .db2 client tables into rows shaped by a .dbd definition, and overlays the client's XFTH DBCache hotfix records onto them. |
|
run
command
|
Click to show internal directories.
Click to hide internal directories.