metric

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2019 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitMetricFile

func InitMetricFile() error

InitMetricFile initializes an empty metric file

Types

type Character

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

Character is a metric that counts the characters

func Load

func Load() (char *Character, err error)

Load reads the last metric state

func (*Character) Add

func (c *Character) Add(characters, ignore string)

Add addes characters to the count ignoring the provided ignored chars

func (*Character) Count

func (c *Character) Count() int64

Count returns the current count

func (*Character) Persist

func (c *Character) Persist() error

Persist saves the metric to disk

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL