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

docs: specify function return value #8115

Merged
merged 3 commits into from
Oct 21, 2022
Merged

Conversation

kingluo
Copy link
Contributor

@kingluo kingluo commented Oct 19, 2022

Description

Fixes # (issue)

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@@ -320,6 +320,10 @@ local function check(age, name)
end
```

The function should return `<boolean>`, `err`.
Copy link
Member

@spacewander spacewander Oct 19, 2022

Choose a reason for hiding this comment

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

PR contains change in the doc should not begin with the prefix "fix"

Copy link
Member

Choose a reason for hiding this comment

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

@kingluo any updates?

Copy link
Member

Choose a reason for hiding this comment

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

we'd better to add some good or bad example, make it clearer

@kingluo kingluo changed the title fix: specify function return value feat: specify function return value Oct 19, 2022
CODE_STYLE.md Outdated
@@ -320,6 +320,24 @@ local function check(age, name)
end
```

The function should return `<boolean>`, `err`.
The first return value means successful or not, if not, the second return value specifies the error message.
The error message can be ignore in some case.
Copy link
Contributor

Choose a reason for hiding this comment

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

The error message can be ignored in some case.

@membphis membphis changed the title feat: specify function return value doc: specify function return value Oct 20, 2022
@membphis membphis changed the title doc: specify function return value docs: specify function return value Oct 20, 2022
@spacewander spacewander merged commit ecdc209 into apache:master Oct 21, 2022
Liu-Junlin pushed a commit to Liu-Junlin/apisix that referenced this pull request Nov 4, 2022
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.

5 participants