From f1b3afee72d938968828d3c121cb0667635c6745 Mon Sep 17 00:00:00 2001 From: cangqiaoyuzhuo <850072022@qq.com> Date: Mon, 28 Oct 2024 22:43:56 +0800 Subject: [PATCH] chore: fix some function names in comment --- context/request_params.go | 2 +- x/client/client.go | 2 +- x/pagination/pagination.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/context/request_params.go b/context/request_params.go index 7d8fec45cc..05830f209d 100644 --- a/context/request_params.go +++ b/context/request_params.go @@ -174,7 +174,7 @@ func (r *RequestParams) GetTrimFileUint64(key string) uint64 { return v } -// GetTrimFileUint64 same as GetTrimFile but it returns the value as uint. +// GetTrimFileUint same as GetTrimFile but it returns the value as uint. func (r *RequestParams) GetTrimFileUint(key string) uint { return uint(r.GetTrimFileUint64(key)) } diff --git a/x/client/client.go b/x/client/client.go index 4983c54382..2af0039e2a 100644 --- a/x/client/client.go +++ b/x/client/client.go @@ -336,7 +336,7 @@ type Uploader struct { Writer *multipart.Writer } -// AddFileSource adds a form field to the uploader with the given key. +// AddField adds a form field to the uploader with the given key. func (u *Uploader) AddField(key, value string) error { f, err := u.Writer.CreateFormField(key) if err != nil { diff --git a/x/pagination/pagination.go b/x/pagination/pagination.go index 60d437d4e6..f6ba90ace1 100644 --- a/x/pagination/pagination.go +++ b/x/pagination/pagination.go @@ -59,7 +59,7 @@ func (opts ListOptions) GetLimit() int { return DefaultSize } -// GetLimit returns the OFFSET value of a query. +// GetOffset returns the OFFSET value of a query. func (opts ListOptions) GetOffset() int { if opts.Page > 1 { return (opts.Page - 1) * opts.GetLimit()