Files
marka/template/structs.go
2025-08-19 17:20:24 +02:00

30 lines
533 B
Go

package template
type BlockType string
const (
DataBlock BlockType = "data" // content between lines "{" and "}"
MatchingBlock BlockType = "matching" // everything outside data blocks
)
type BlockField struct {
Path string
CodecType CodecType
Value any
Hidden bool
}
type Block struct {
Type BlockType
Path string
Codec CodecType
ListTemplate string
Fields []BlockField
Value any
content string
}
func (b Block) GetContent() string {
return b.content
}