add code to msg
This commit is contained in:
@@ -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%%
|
||||
|
||||
Reference in New Issue
Block a user