stats

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var I = stats{
	History: []history{},
	Words:   map[string][]wordStat{},
}

I contains current statistics its initialized because json.Marshal sees the properties as null pointers not empty objects as it should

Functions

func AddHistory

func AddHistory(wpm float64)

AddHistory appends wpm with a timestamp to the history property

func AddWord

func AddWord(rawWord string, time time.Duration, errorCount int)

AddWord appends stats about a word

func Save

func Save() error

Save saves the current statistics

Types

This section is empty.

Jump to

Keyboard shortcuts

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