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

Update developer docs #851

Merged
merged 1 commit into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/developer/go-style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,27 @@ func (int required, ...Options) {

## Error Handling

### Prefer inline error handling

When possible, use inline error handling.

DO:

```go
if err := execute(); err != nil {
// handle error
}
```

DO NOT:

```go
err := execute()
if err != nil {
// handle error
}
```

### Do not filter context when returning errors

Preserve error context by wrapping errors as the stack unwinds. Utilize native error wrapping with `fmt.Errorf` and
Expand Down
5 changes: 4 additions & 1 deletion docs/developer/pull-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

## Submitter Guidelines

- Fill in [our pull request template](/.github/PULL_REQUEST_TEMPLATE.md).
- Title the PR using customer-focused language. The release notes are generated from PR titles, so the titles should
describe the feature from the user's perspective and avoid implementation details. For example, instead of "Add debug
boolean", write "Support configurable debug mode".
- Fill in [our pull request template](/.github/PULL_REQUEST_TEMPLATE.md).
- Make sure to include the issue number in the PR description to automatically close the issue when the PR mergers.
See [Closing Issues via Pull Requests](https://github.blog/2013-05-14-closing-issues-via-pull-requests/) for details.
- For significant changes, break your changes into a logical series of smaller commits. By approaching the changes
Expand Down