Documentation
¶
Index ¶
- func Create(projectName string, hourlyRate float64) error
- func CreateWithTemplate(projectName string, hourlyRate float64, description string) error
- func FormatDate(t time.Time) string
- func FormatDateDashed(t time.Time) string
- func FormatDateLong(t time.Time) string
- func FormatDateTime(t time.Time) string
- func FormatDateTimeDashed(t time.Time) string
- func FormatDateTimeLong(t time.Time) string
- func FormatTime(t time.Time) string
- func FormatTimePadded(t time.Time) string
- func GetGlobalConfigPath() (string, error)
- type Config
- type GlobalConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateWithTemplate ¶
func FormatDate ¶
func FormatDateDashed ¶
func FormatDateLong ¶
func FormatDateTime ¶
func FormatDateTimeDashed ¶
func FormatDateTimeLong ¶
func FormatTime ¶
func FormatTimePadded ¶
func GetGlobalConfigPath ¶
Types ¶
type Config ¶
type Config struct {
ProjectName string `yaml:"project_name"`
HourlyRate float64 `yaml:"hourly_rate,omitempty"`
Description string `yaml:"description,omitempty"`
}
IMPORTANT: When adding new fields to this struct, also update configTemplate below.
func FindAndLoad ¶
type GlobalConfig ¶
type GlobalConfig struct {
Currency string `yaml:"currency"`
DateFormat string `yaml:"date_format,omitempty"`
TimeFormat string `yaml:"time_format,omitempty"`
Timezone string `yaml:"timezone,omitempty"`
}
func DefaultGlobalConfig ¶
func DefaultGlobalConfig() *GlobalConfig
func LoadGlobalConfig ¶
func LoadGlobalConfig() (*GlobalConfig, error)
func (*GlobalConfig) Save ¶
func (gc *GlobalConfig) Save() error
Click to show internal directories.
Click to hide internal directories.