Discover Packages
github.com/Mystik738/frostlang
package
module
Version:
v0.0.0-...-f51e24e
Opens a new window with list of versions in this module.
Published: Nov 21, 2019
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
README
README
¶
frostlang
Provides two Go functions to convert Frostpunk .lang files to more readable JSON files, and vice versa. Reads all .lang files in a directory and writes them to JSON, or all .json files and writes to .lang.
License
MIT
Expand ▾
Collapse ▴
Documentation
¶
func ConvertJSONToLang(dir string , overwrite bool )
ConvertJSONToLang converts all json files in a directory to lang
func ConvertLangToJSON(dir string , overwrite bool )
ConvertLangToJSON converts all lang files in a directory to json
Node are strucutres that should have Text or Children, but not both
This allows us to store a string-based JSON object of indeterminate depth.
NewNode Simple way to instantiate a Node
Add a new text to our json strucutre, by tags
AppendChild Simple way to add a child by the child's tag
ToJSON turns our struct to a json string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.