formatter

package
v0.0.0-...-0cd33ab Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package scanner allows to extract information from the DTD and create corresponding DTD structs

Package scanner allows to extract information from the DTD and create corresponding DTD structs

Package scanner allows to extract information from the DTD and create corresponding DTD structs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvailaibleFormatters

func AvailaibleFormatters() []string

SetFormatter Setter for formatter

Types

type DTDFormatter

type DTDFormatter struct {
	// contains filtered or unexported fields
}

IDTDBlock Interface for DTD block

func NewDTDFormatter

func NewDTDFormatter(log *zap.SugaredLogger) *DTDFormatter

func (*DTDFormatter) AttributeType

func (ft *DTDFormatter) AttributeType(a int) string

AttributeType convert DTD Attribute type (int) to its corresponding string value

func (*DTDFormatter) Render

func (ft *DTDFormatter) Render(collection *[]DTD.IDTDBlock, path string)

Render Render DTD blocks

func (*DTDFormatter) RenderAttlist

func (ft *DTDFormatter) RenderAttlist(b DTD.IDTDBlock) string

RenderAttlist Render an ATTLIST

func (*DTDFormatter) RenderAttribute

func (ft *DTDFormatter) RenderAttribute(a DTD.Attribute) string

RenderAttribute Render an attribute

func (*DTDFormatter) RenderComment

func (ft *DTDFormatter) RenderComment(b DTD.IDTDBlock) string

RenderComment render a comment

func (*DTDFormatter) RenderElement

func (ft *DTDFormatter) RenderElement(b DTD.IDTDBlock) string

RenderAttlist Render an Element

func (*DTDFormatter) RenderEntity

func (ft *DTDFormatter) RenderEntity(b DTD.IDTDBlock) string

RenderEntity render an entity

func (*DTDFormatter) RenderNotation

func (ft *DTDFormatter) RenderNotation(b DTD.IDTDBlock) string

RenderComment render a comment

type GoFormatter

type GoFormatter struct {
	// contains filtered or unexported fields
}

IDTDBlock Interface for DTD block

func NewGoFormatter

func NewGoFormatter(log *zap.SugaredLogger, packageName string) *GoFormatter

NewGoFormatter instantiate new GoFormatter struct

func (*GoFormatter) Render

func (ft *GoFormatter) Render(collection *[]DTD.IDTDBlock, path string)

Render Render DTD blocks

Jump to

Keyboard shortcuts

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