Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features/api generator #122

Merged
merged 75 commits into from
Apr 16, 2024
Merged

Features/api generator #122

merged 75 commits into from
Apr 16, 2024

Conversation

bachue
Copy link
Contributor

@bachue bachue commented Jan 4, 2024

KODO-19449
KODO-18801

@bachue bachue force-pushed the features/api-generator branch 5 times, most recently from 7f06a19 to 89b2da0 Compare January 5, 2024 08:04
@bachue bachue force-pushed the features/api-generator branch from 89b2da0 to 0c1b84a Compare January 12, 2024 03:22
Copy link

qiniu-x bot commented Feb 5, 2024

[Git-flow] Hi @bachue, There are some suggestions for your information:


Rebase suggestions

  • Following commits have duplicated messages

    more apis in storage are rewritten by storagev2

    more apis in storage are rewritten by storagev2

Which seems insignificant, recommend to use git rebase command to reorganize your PR.

For other git-flow instructions, recommend refer to these examples.

If you have any questions about this comment, feel free to raise an issue here:

client/client.go Outdated
@@ -279,7 +284,7 @@ func ResponseError(resp *http.Response) error {
func CallRet(ctx context.Context, ret interface{}, resp *http.Response) (err error) {

defer func() {
io.Copy(ioutil.Discard, resp.Body)
internal_io.SinkAll(resp.Body)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci-lint] Error return value of internal_io.SinkAll is not checked (errcheck)

If you have any questions about this comment, feel free to raise an issue here:

@@ -96,7 +98,7 @@ func DoAndDecodeJsonResponse(c Client, options RequestParams, ret interface{}) e
resp, err := Do(c, options)
defer func() {
if resp != nil && resp.Body != nil {
io.Copy(ioutil.Discard, resp.Body)
internal_io.SinkAll(resp.Body)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci-lint] Error return value of internal_io.SinkAll is not checked (errcheck)

If you have any questions about this comment, feel free to raise an issue here:

@@ -113,7 +117,7 @@ func (interceptor *hostsRetryInterceptor) Intercept(req *http.Request, handler H
req = reqBefore

if resp != nil && resp.Body != nil {
io.Copy(ioutil.Discard, resp.Body)
internal_io.SinkAll(resp.Body)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci-lint] Error return value of internal_io.SinkAll is not checked (errcheck)

If you have any questions about this comment, feel free to raise an issue here:

func ReadAll(r io.Reader) ([]byte, error) {
switch b := r.(type) {
case *BytesNopCloser:
b.Seek(0, io.SeekEnd)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci-lint] Error return value of b.Seek is not checked (errcheck)

If you have any questions about this comment, feel free to raise an issue here:

client/client.go Outdated
@@ -279,7 +284,7 @@ func ResponseError(resp *http.Response) error {
func CallRet(ctx context.Context, ret interface{}, resp *http.Response) (err error) {

defer func() {
io.Copy(ioutil.Discard, resp.Body)
internal_io.SinkAll(resp.Body)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci-lint] Error return value of internal_io.SinkAll is not checked (errcheck)

If you have any questions about this comment, feel free to raise an issue here:

@@ -96,7 +98,7 @@ func DoAndDecodeJsonResponse(c Client, options RequestParams, ret interface{}) e
resp, err := Do(c, options)
defer func() {
if resp != nil && resp.Body != nil {
io.Copy(ioutil.Discard, resp.Body)
internal_io.SinkAll(resp.Body)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci-lint] Error return value of internal_io.SinkAll is not checked (errcheck)

If you have any questions about this comment, feel free to raise an issue here:

@@ -113,7 +117,7 @@ func (interceptor *hostsRetryInterceptor) Intercept(req *http.Request, handler H
req = reqBefore

if resp != nil && resp.Body != nil {
io.Copy(ioutil.Discard, resp.Body)
internal_io.SinkAll(resp.Body)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci-lint] Error return value of internal_io.SinkAll is not checked (errcheck)

If you have any questions about this comment, feel free to raise an issue here:

func ReadAll(r io.Reader) ([]byte, error) {
switch b := r.(type) {
case *BytesNopCloser:
b.Seek(0, io.SeekEnd)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci-lint] Error return value of b.Seek is not checked (errcheck)

If you have any questions about this comment, feel free to raise an issue here:


if body := request.Body; body != nil {
if bodyJson := body.Json; bodyJson != nil {
bodyJson.generate(group, opts)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci-lint] Error return value of bodyJson.generate is not checked (errcheck)

If you have any questions about this comment, feel free to raise an issue here:


if body := response.Body; body != nil {
if bodyJson := body.Json; bodyJson != nil {
bodyJson.generate(group, opts)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci-lint] Error return value of bodyJson.generate is not checked (errcheck)

If you have any questions about this comment, feel free to raise an issue here:


// SetScope 指定上传的目标资源空间 Bucket 和资源键 Key
func (putPolicy PutPolicy) SetScope(value string) PutPolicy {
putPolicy.Set(putPolicyKeyScope, value)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci-lint] Error return value of putPolicy.Set is not checked (errcheck)

If you have any questions about this comment, feel free to raise an issue here:


// SetDeadline 指定上传策略有效截止时间
func (putPolicy PutPolicy) SetDeadline(value int64) PutPolicy {
putPolicy.Set(putPolicyKeyDeadline, value)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci-lint] Error return value of putPolicy.Set is not checked (errcheck)

If you have any questions about this comment, feel free to raise an issue here:


// SetIsPrefixalScope 指定是否允许用户上传以 scope 的 keyPrefix 为前缀的文件
func (putPolicy PutPolicy) SetIsPrefixalScope(value int64) PutPolicy {
putPolicy.Set(putPolicyKeyIsPrefixalScope, value)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci-lint] Error return value of putPolicy.Set is not checked (errcheck)

If you have any questions about this comment, feel free to raise an issue here:

@bachue bachue force-pushed the features/api-generator branch from 507bb22 to 7b41f89 Compare April 2, 2024 03:15
@bachue bachue merged commit 6c9d7f5 into qiniu:master Apr 16, 2024
19 checks passed
@bachue bachue deleted the features/api-generator branch April 16, 2024 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants