From b5a65e567bfd592fa9f95d2fe6224c754c1ae96d Mon Sep 17 00:00:00 2001 From: Michael Lynch Date: Tue, 21 Mar 2017 20:40:21 -0400 Subject: [PATCH] Fixing some linter errors in account package --- account/account.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/account/account.go b/account/account.go index 977ac9f..065e0d7 100644 --- a/account/account.go +++ b/account/account.go @@ -2,7 +2,6 @@ package account import ( "encoding/json" - "errors" "time" "github.com/mtlynch/prosperbot/redis" @@ -20,12 +19,15 @@ type ( accountAttributeFunc func(r redis.AccountRecord) float64 + // AccountAttributeRecord represents a timestamped value-based property of the + // user's account (e.g. total value, cash balance). AccountAttributeRecord struct { Value float64 Timestamp time.Time } ) +// NewAccountInfoManager creates a new accountInfoManager. func NewAccountInfoManager() (accountInfoManager, error) { r, err := redis.New() if err != nil { @@ -34,8 +36,6 @@ func NewAccountInfoManager() (accountInfoManager, error) { return accountInfoManager{r}, nil } -var ErrNoAccountRecords = errors.New("no record of account cash balance") - func accountRecordToAccountAttributeRecord(r redis.AccountRecord, f accountAttributeFunc) AccountAttributeRecord { return AccountAttributeRecord{ Value: f(r),