From 42864dace3777a222d61f844f29fb04ec76b61ad Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Mon, 3 Apr 2017 19:50:16 -0400 Subject: [PATCH] Rename Response/Request Profile -> Prof This is more in line with the rest, which match their OFX message set names except for capitalization. --- cmd/ofx/detect_settings.go | 2 +- common.go | 8 ++++---- profile.go | 4 ++-- request.go | 4 ++-- response.go | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmd/ofx/detect_settings.go b/cmd/ofx/detect_settings.go index 3cbf2e2..01a6558 100644 --- a/cmd/ofx/detect_settings.go +++ b/cmd/ofx/detect_settings.go @@ -146,7 +146,7 @@ func tryProfile(appId, appVer, version string, noindent bool) bool { TrnUID: *uid, DtProfUp: ofxgo.Date(time.Unix(0, 0)), } - query.Profile = append(query.Profile, &profileRequest) + query.Prof = append(query.Prof, &profileRequest) _, err = client.Request(&query) if err == nil { diff --git a/common.go b/common.go index ce47762..26eec5b 100644 --- a/common.go +++ b/common.go @@ -30,7 +30,7 @@ const ( SecListRq PresDirRq PresDlvRq - ProfileRq + ProfRq ImageRq // Responses SignonRs @@ -46,7 +46,7 @@ const ( SecListRs PresDirRs PresDlvRs - ProfileRs + ProfRs ImageRs ) @@ -78,7 +78,7 @@ func (t messageType) String() string { return "PRESDIRMSGSRQV1" case PresDlvRq: return "PRESDLVMSGSRQV1" - case ProfileRq: + case ProfRq: return "PROFMSGSRQV1" case ImageRq: return "IMAGEMSGSRQV1" @@ -108,7 +108,7 @@ func (t messageType) String() string { return "PRESDIRMSGSRSV1" case PresDlvRs: return "PRESDLVMSGSRSV1" - case ProfileRs: + case ProfRs: return "PROFMSGSRSV1" case ImageRs: return "IMAGEMSGSRSV1" diff --git a/profile.go b/profile.go index ad3b222..fb3594a 100644 --- a/profile.go +++ b/profile.go @@ -26,7 +26,7 @@ func (r *ProfileRequest) Valid() (bool, error) { } func (r *ProfileRequest) Type() messageType { - return ProfileRq + return ProfRq } type SignonInfo struct { @@ -138,5 +138,5 @@ func (pr *ProfileResponse) Valid() (bool, error) { } func (pr *ProfileResponse) Type() messageType { - return ProfileRs + return ProfRs } diff --git a/request.go b/request.go index 3959085..b26f8d7 100644 --- a/request.go +++ b/request.go @@ -28,7 +28,7 @@ type Request struct { SecList []Message // PresDir []Message // PresDlv []Message // - Profile []Message // + Prof []Message // Image []Message // indent bool // Whether to indent the marshaled XML @@ -139,7 +139,7 @@ NEWFILEUID:NONE {oq.SecList, SecListRq}, {oq.PresDir, PresDirRq}, {oq.PresDlv, PresDlvRq}, - {oq.Profile, ProfileRq}, + {oq.Prof, ProfRq}, {oq.Image, ImageRq}, } for _, set := range messageSets { diff --git a/response.go b/response.go index 267ea84..9143723 100644 --- a/response.go +++ b/response.go @@ -28,7 +28,7 @@ type Response struct { SecList []Message // PresDir []Message // PresDlv []Message // - Profile []Message // + Prof []Message // Image []Message // } @@ -207,7 +207,7 @@ var responseTypes = map[string]map[string]reflect.Type{ (&SecurityList{}).Name(): reflect.TypeOf(SecurityList{})}, PresDirRs.String(): map[string]reflect.Type{}, PresDlvRs.String(): map[string]reflect.Type{}, - ProfileRs.String(): map[string]reflect.Type{ + ProfRs.String(): map[string]reflect.Type{ (&ProfileResponse{}).Name(): reflect.TypeOf(ProfileResponse{})}, ImageRs.String(): map[string]reflect.Type{}, } @@ -326,7 +326,7 @@ func ParseResponse(reader io.Reader) (*Response, error) { SecListRs.String(): &or.SecList, PresDirRs.String(): &or.PresDir, PresDlvRs.String(): &or.PresDlv, - ProfileRs.String(): &or.Profile, + ProfRs.String(): &or.Prof, ImageRs.String(): &or.Image, }