From 3e4c7a16ff13bc03b23ed325acfc1320fc5f1d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E7=BA=AF=E5=87=80?= <1113655791@qq.com> Date: Mon, 17 Mar 2025 21:53:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E8=A7=A3=E5=86=B3=E7=9B=98?= =?UTF-8?q?=E5=8F=A3=E4=BB=B7=E6=A0=BC=E4=B8=8D=E5=AF=B9=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98,=E6=84=9F=E8=A7=89=E4=B8=8D=E6=98=AF=E5=BE=88?= =?UTF-8?q?=E5=90=88=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codes.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/codes.go b/codes.go index 2d1e4ee..3b1d8ac 100644 --- a/codes.go +++ b/codes.go @@ -125,7 +125,7 @@ func (this *Codes) Get(code string) *CodeModel { } func (this *Codes) Update(byCache ...bool) error { - codes, err := this.Code(len(byCache) > 0 && byCache[0]) + codes, err := this.GetCodes(len(byCache) > 0 && byCache[0]) if err != nil { return err } @@ -139,8 +139,8 @@ func (this *Codes) Update(byCache ...bool) error { return err } -// Code 更新股票并返回结果 -func (this *Codes) Code(byDatabase bool) ([]*CodeModel, error) { +// GetCodes 更新股票并返回结果 +func (this *Codes) GetCodes(byDatabase bool) ([]*CodeModel, error) { //2. 查询数据库所有股票 list := []*CodeModel(nil)