ledger-tools: github.com/ginabythebay/ledger-tools/csv/ops Index | Files

package ops

import "github.com/ginabythebay/ledger-tools/csv/ops"


Package Files


func StripNewlines Uses

func StripNewlines(l *Line) error

StripNewlines removes any newlines in a record

type Line Uses

type Line struct {
    LineNo int
    Record []string

Line represents a line we read from a csv file

func NewLine Uses

func NewLine(lineNo int, record []string) *Line

NewLine creates a Line structure

type Mutator Uses

type Mutator func(l *Line) error

Mutator is a function that knows how to mutate a Line

func CheckWithdrawal Uses

func CheckWithdrawal(i int) Mutator

CheckWithdrawal converts an entry like 'Check Withdrawal: #999999' to '(#999999)'

func DeparenNegatives Uses

func DeparenNegatives(i int) Mutator

func EnsureDollars Uses

func EnsureDollars(i int) Mutator

func MoveAndNegateIfPresent Uses

func MoveAndNegateIfPresent(from int, to int) Mutator

func Negate Uses

func Negate(i int) Mutator

func RemoveText Uses

func RemoveText(i int, rem string) Mutator

RemoveText removes the substring rem, if it is present, up to one time.

func ReplaceHeader Uses

func ReplaceHeader(header []string) Mutator

ReplaceHeader changes the first line

func StripCommas Uses

func StripCommas(i int) Mutator

func StripSuffix Uses

func StripSuffix(i int, suffix string) Mutator

Package ops imports 3 packages (graph) and is imported by 4 packages. Updated 2018-03-28. Refresh now. Tools for package owners.