add code to msg

This commit is contained in:
2022-01-10 11:47:03 +08:00
parent fcf1c30128
commit d0cf8768b4
2 changed files with 4 additions and 4 deletions

View File

@@ -87,7 +87,7 @@ func (f *fund) Msg() string {
if err1 == nil && err2 == nil {
rise = fmt.Sprintf("%.5f", cur-last)
}
msg := fmt.Sprintf(msgTemplate, f.FName, f.UpdateTime, f.UnitVal, f.EstimateVal, rise, f.RisePer)
msg := fmt.Sprintf(msgTemplate, f.FName, f.Code, f.UpdateTime, f.UnitVal, f.EstimateVal, rise, f.RisePer)
return msg
}
@@ -157,7 +157,7 @@ func NewFund(code string) (*fund, error) {
return ff, err
}
const msgTemplate = `%s
const msgTemplate = `%s(%s)
更新时间:%s
单位净值:%s 估算净值:%s
估算涨幅:(%s) %s%%