copybook

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Copybook

type Copybook struct {
	Name    string
	Root    *lex.Record
	Package string
	// contains filtered or unexported fields
}

Copybook represents a copybook.

func New

func New(name, pkg string, tmpl *template.Template) *Copybook

New creates a new copybook.

func (*Copybook) Preview

func (c *Copybook) Preview()

Preview prints a preview of the copybook.

func (*Copybook) WriteToStruct

func (c *Copybook) WriteToStruct(writer io.Writer) error

WriteToStruct writes the copybook to a formatted struct.

type Record

type Record struct {
	Number     int          // Number is not necessarily required
	Level      int          // Level is not necessarily required
	Name       string       // Name is required
	Type       reflect.Kind // Type is required
	Length     int          // Length is required
	Occurrence int          // Occurrence is required if present
}

Record represents a record.

Jump to

Keyboard shortcuts

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