From 85406e7eb89e3afbf93717dcb819dd9c2ac6351d Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Thu, 6 Apr 2017 19:18:09 -0400 Subject: [PATCH] Fix MfType values "OPEN" and "END" had an accidental space between them before in the comment the original list was based upon --- constants.go | 7 +++---- generate_constants.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/constants.go b/constants.go index b7e90ff..97a2750 100644 --- a/constants.go +++ b/constants.go @@ -1968,16 +1968,15 @@ func NewAssetClass(s string) (assetClass, error) { type mfType uint const ( - MfTypeOpen mfType = 1 + iota - MfTypeEnd + MfTypeOpenEnd mfType = 1 + iota MfTypeCloseEnd MfTypeOther ) -var mfTypes = [...]string{"OPEN", "END", "CLOSEEND", "OTHER"} +var mfTypes = [...]string{"OPENEND", "CLOSEEND", "OTHER"} func (e mfType) Valid() bool { - return e >= MfTypeOpen && e <= MfTypeOther + return e >= MfTypeOpenEnd && e <= MfTypeOther } func (e mfType) String() string { diff --git a/generate_constants.py b/generate_constants.py index bec0c01..928c4cf 100755 --- a/generate_constants.py +++ b/generate_constants.py @@ -39,7 +39,7 @@ enums = { "CouponFreq": ["Monthly", "Quarterly", "Semiannual", "Annual", "Other"], "CallType": ["Call", "Put", "Prefund", "Maturity"], "AssetClass": ["DomesticBond", "IntlBond", "LargeStock", "SmallStock", "IntlStock", "MoneyMrkt", "Other"], - "MfType": ["Open", "End", "CloseEnd", "Other"], + "MfType": ["OpenEnd", "CloseEnd", "Other"], "OptType": ["Put", "Call"], "StockType": ["Common", "Preferred", "Convertible", "Other"], "OfxSec": ["None", "Type 1"],