Versions in this module Expand all Collapse all v0 v0.1.2 Aug 5, 2026 v0.1.1 Jun 23, 2026 v0.1.0 Jun 23, 2026 Changes in this version + var MinimalFormatConfig = formatConfig + func AnyToString(value any) string + func GetContinuousDigitsIndices(name string) (startIndex int, endIndex int) + func NewFormatConfig(classIndentSize int, fieldIndentSize int, fieldSize int) formatConfig + type ClassDef struct + BaseFieldIndexMap map[string]int + Extensible *ExtensibleDef + FieldIdxWithDefault []int + Fields []FieldDef + Group string + MinFields int + Name string + func (class *ClassDef) FindFieldIndex(fieldName string) (int, error) + func (class *ClassDef) GetFieldName(index int, addUnits bool) string + type ExtPattern struct + Prefix string + SearchPrefix string + SearchSuffix string + Suffix string + type ExtensibleDef struct + BeginIndex int + Patterns []ExtPattern + Size int + type FieldDef struct + Autocalculatable bool + Autosizable bool + Choices []string + Default string + Name string + Required bool + Type string + Units string + type Fields map[string]any + type IDD struct + Classes map[string]*ClassDef + OrderedClasses []*ClassDef + Version string + func NewIDD() *IDD + func ParseIDD(r io.Reader) (*IDD, error) + func ParseIDDFile(filename string) (*IDD, error) + type IDF struct + IDD *IDD + Objects map[string][]*IDFObject + func NewIDF(idd *IDD) *IDF + func ParseIDF(r io.Reader, idd *IDD) (*IDF, error) + func ParseIDFFile(filename string, idd *IDD) (*IDF, error) + func (idf *IDF) AddObject(className string, initialValues Fields, defaultValues ...bool) (*IDFObject, error) + func (idf *IDF) Format(cfg formatConfig) string + func (idf *IDF) GetObjectByName(className string, objectName string) (*IDFObject, error) + func (idf *IDF) GetObjects(className string) []*IDFObject + func (idf *IDF) RemoveObject(target *IDFObject) error + func (idf *IDF) Save(filename string, cfg ...formatConfig) error + func (idf *IDF) String() string + func (idf *IDF) WriteTo(w io.Writer) (int64, error) + type IDFObject struct + Class *ClassDef + Values []string + func (obj *IDFObject) Format(cfg formatConfig) string + func (obj *IDFObject) GetFloat(fieldName string) float64 + func (obj *IDFObject) GetFloatErr(fieldName string) (float64, error) + func (obj *IDFObject) GetInt(fieldName string) int + func (obj *IDFObject) GetIntErr(fieldName string) (int, error) + func (obj *IDFObject) GetString(fieldName string) string + func (obj *IDFObject) GetStringErr(fieldName string) (string, error) + func (obj *IDFObject) Set(fieldName string, value any) error + func (obj *IDFObject) SetByIndex(fieldIndex int, value any) + func (obj *IDFObject) String() string + func (obj *IDFObject) Update(values Fields) error + func (obj *IDFObject) WriteTo(w io.Writer) (int64, error) + type Lexer struct + IsIDD bool + LineNum int + func NewLexer(r io.Reader, isIDD bool) *Lexer + func (l *Lexer) NextToken() Token + type Token struct + Type TokenType + Value string + type TokenType int + const TokenComma + const TokenEOF + const TokenError + const TokenSemicolon + const TokenText