Documentation ¶
Overview ¶
These are not prod ready codes, but they are good enough. Skipping linters
Index ¶
- Constants
- func Fetch(url string) (io.Reader, error)
- func WriteGoSource(packageName string, enums []*Enum, out io.Writer, opts ...WriterOption) error
- func WriteOpcodeSource(packageName string, opcodes []*OpcodeTemplate, out io.Writer) error
- type Enum
- type EnumField
- type OpcodeTemplate
- type WriterOption
Constants ¶
View Source
const OpcodeHeaderURL = `https://raw.githubusercontent.com/azerothcore/azerothcore-wotlk/master/src/server/game/Server/Protocol/Opcodes.h`
Variables ¶
This section is empty.
Functions ¶
func WriteGoSource ¶
WriteGoSource writes a Go source file.
func WriteOpcodeSource ¶
func WriteOpcodeSource(packageName string, opcodes []*OpcodeTemplate, out io.Writer) error
Types ¶
type Enum ¶
func ParseHeaderFile ¶
type OpcodeTemplate ¶
OpcodeTemplate parsed opcode holder struct.
func ParseOpcodes ¶
func ParseOpcodes(r io.Reader) ([]*OpcodeTemplate, error)
type WriterOption ¶
type WriterOption func(*writerConfig)
WriterOption is a function that can be passed to NewWriter.
func WithEndField ¶
func WithEndField(use bool) WriterOption
WithEndField sets when the enum uses reference fields to the previous enum.
func WithSingleEnum ¶
func WithSingleEnum(enumName string) WriterOption
WithSingleEnum sets whether this is a single enum.
Click to show internal directories.
Click to hide internal directories.