Documentation
¶
Overview ¶
Package types defines the CalcMark type system
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Boolean ¶
type Boolean struct {
Value bool
}
Boolean represents a boolean value
func NewBoolean ¶
NewBoolean creates a Boolean from various input types
type Currency ¶
type Currency struct {
Value decimal.Decimal
Symbol string
SourceFormat string // Original formatting from source (e.g., "$1,000", "$10000")
}
Currency represents a currency value with a symbol
func NewCurrency ¶
NewCurrency creates a Currency from various input types
func NewCurrencyWithFormat ¶
NewCurrencyWithFormat creates a Currency with source format preservation
func (*Currency) String ¶
String returns the string representation with currency symbol If SourceFormat is set, returns that; otherwise formats as $X.XX
type Number ¶
type Number struct {
Value decimal.Decimal
SourceFormat string // Original formatting from source (e.g., "1,000", "1k", "10000")
}
Number represents a numeric value with arbitrary precision
func NewNumberWithFormat ¶
NewNumberWithFormat creates a Number with source format preservation
func (*Number) String ¶
String returns the string representation of the number If SourceFormat is set, returns that; otherwise formats with default rules