package util

import "git.sr.ht/~mendelmaleh/pfin/util"

Index

Constants

const ISO8601 = "2006-01-02"

Functions

func FormatCents

func FormatCents(f float64) string

func FormatDate

func FormatDate(t time.Time) string

func FormatFields

func FormatFields(data [][]string, sep string) string

func FormatTx

func FormatTx(tx pfin.Transaction, sep string) string

func MatchDir

func MatchDir(acc pfin.Account, root string) ([]string, error)

func ParseDir

func ParseDir(acc pfin.Account, root string) ([]pfin.Transaction, error)

Types

type ErrNoMatches

type ErrNoMatches struct {
	// contains filtered or unexported fields
}

func (ErrNoMatches) Error

func (e ErrNoMatches) Error() string

type StringFilter

type StringFilter struct {
	String string
	Map    map[string]bool

	Default bool
}

func (*StringFilter) Filter

func (f *StringFilter) Filter(s string) bool

Filter returns true if s should be filtered out (skipped)

Source Files

dir.go filter.go format.go

Version
v0.0.0-20240211185340-c44b6515a97b (latest)
Published
Feb 11, 2024
Platform
linux/amd64
Imports
8 packages
Last checked
3 weeks ago

Tools for package owners.