Documentation ¶
Index ¶
- type Properties
- func (c *Properties) GetAsBoolean(key string, defaultValue bool) bool
- func (c *Properties) GetAsDouble(key string, defaultValue float64) float64
- func (c *Properties) GetAsInteger(key string, defaultValue int) int
- func (c *Properties) GetAsLong(key string, defaultValue int32) int32
- func (c *Properties) GetAsString(key string, defaultValue string) string
- func (c *Properties) LoadFromFile(file string)
- func (c *Properties) SaveToFile(file string)
- func (c *Properties) SetAsBoolean(key string, value bool)
- func (c *Properties) SetAsDouble(key string, value float64)
- func (c *Properties) SetAsInteger(key string, value int)
- func (c *Properties) SetAsLong(key string, value int32)
- func (c *Properties) SetAsString(key string, value string)
- type PropertyFileLine
- func (c *PropertyFileLine) GetComment() string
- func (c *PropertyFileLine) GetValue() string
- func (c *PropertyFileLine) Key() string
- func (c *PropertyFileLine) Line() string
- func (c *PropertyFileLine) SetComment(value string)
- func (c *PropertyFileLine) SetValue(value string)
- func (c *PropertyFileLine) ToString() string
- type TConverter
- func (c *TConverter) BooleanToString(value bool) string
- func (c *TConverter) DoubleToString(value float64) string
- func (c *TConverter) FloatToString(value float32) string
- func (c *TConverter) IntegerToString(value int) string
- func (c *TConverter) LongToString(value int32) string
- func (c *TConverter) StringToBoolean(value string, defaultValue bool) bool
- func (c *TConverter) StringToDouble(value string, defaultValue float64) float64
- func (c *TConverter) StringToFloat(value string, defaultValue float32) float32
- func (c *TConverter) StringToInteger(value string, defaultValue int) int
- func (c *TConverter) StringToLong(value string, defaultValue int32) int32
- type TFormatter
- func (c *TFormatter) FormatDate(date time.Time) string
- func (c *TFormatter) FormatNumber(value float64, decimals int) string
- func (c *TFormatter) FormatTime(date time.Time) string
- func (c *TFormatter) FormatTimeSpan(ticks int64) string
- func (c *TFormatter) PadLeft(value string, length int, padSymbol string) string
- func (c *TFormatter) PadRight(value string, length int, padSymbol string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Properties ¶
type Properties struct { Lines []*PropertyFileLine // contains filtered or unexported fields }
func NewProperties ¶
func NewProperties() *Properties
func (*Properties) GetAsBoolean ¶
func (c *Properties) GetAsBoolean(key string, defaultValue bool) bool
func (*Properties) GetAsDouble ¶
func (c *Properties) GetAsDouble(key string, defaultValue float64) float64
func (*Properties) GetAsInteger ¶
func (c *Properties) GetAsInteger(key string, defaultValue int) int
func (*Properties) GetAsString ¶
func (c *Properties) GetAsString(key string, defaultValue string) string
func (*Properties) LoadFromFile ¶
func (c *Properties) LoadFromFile(file string)
func (*Properties) SaveToFile ¶
func (c *Properties) SaveToFile(file string)
func (*Properties) SetAsBoolean ¶
func (c *Properties) SetAsBoolean(key string, value bool)
func (*Properties) SetAsDouble ¶
func (c *Properties) SetAsDouble(key string, value float64)
func (*Properties) SetAsInteger ¶
func (c *Properties) SetAsInteger(key string, value int)
func (*Properties) SetAsLong ¶
func (c *Properties) SetAsLong(key string, value int32)
func (*Properties) SetAsString ¶
func (c *Properties) SetAsString(key string, value string)
type PropertyFileLine ¶
type PropertyFileLine struct {
// contains filtered or unexported fields
}
func NewPropertyFileLine ¶
func NewPropertyFileLine(key string, value string, comment string) *PropertyFileLine
func (*PropertyFileLine) GetComment ¶
func (c *PropertyFileLine) GetComment() string
func (*PropertyFileLine) GetValue ¶
func (c *PropertyFileLine) GetValue() string
func (*PropertyFileLine) Key ¶
func (c *PropertyFileLine) Key() string
func (*PropertyFileLine) Line ¶
func (c *PropertyFileLine) Line() string
func (*PropertyFileLine) SetComment ¶
func (c *PropertyFileLine) SetComment(value string)
func (*PropertyFileLine) SetValue ¶
func (c *PropertyFileLine) SetValue(value string)
func (*PropertyFileLine) ToString ¶
func (c *PropertyFileLine) ToString() string
type TConverter ¶
type TConverter struct { }
var Converter TConverter = TConverter{}
func (*TConverter) BooleanToString ¶
func (c *TConverter) BooleanToString(value bool) string
func (*TConverter) DoubleToString ¶
func (c *TConverter) DoubleToString(value float64) string
func (*TConverter) FloatToString ¶
func (c *TConverter) FloatToString(value float32) string
func (*TConverter) IntegerToString ¶
func (c *TConverter) IntegerToString(value int) string
func (*TConverter) LongToString ¶
func (c *TConverter) LongToString(value int32) string
func (*TConverter) StringToBoolean ¶
func (c *TConverter) StringToBoolean(value string, defaultValue bool) bool
func (*TConverter) StringToDouble ¶
func (c *TConverter) StringToDouble(value string, defaultValue float64) float64
func (*TConverter) StringToFloat ¶
func (c *TConverter) StringToFloat(value string, defaultValue float32) float32
func (*TConverter) StringToInteger ¶
func (c *TConverter) StringToInteger(value string, defaultValue int) int
func (*TConverter) StringToLong ¶
func (c *TConverter) StringToLong(value string, defaultValue int32) int32
type TFormatter ¶
type TFormatter struct { }
var Formatter TFormatter = TFormatter{}
func (*TFormatter) FormatDate ¶
func (c *TFormatter) FormatDate(date time.Time) string
func (*TFormatter) FormatNumber ¶
func (c *TFormatter) FormatNumber(value float64, decimals int) string
func (*TFormatter) FormatTime ¶
func (c *TFormatter) FormatTime(date time.Time) string
func (*TFormatter) FormatTimeSpan ¶
func (c *TFormatter) FormatTimeSpan(ticks int64) string
Click to show internal directories.
Click to hide internal directories.