forked from openpredictionmarkets/socialpredict
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Draft Golang Conventions. (openpredictionmarkets#258)
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Golang Backend Conventions | ||
|
||
## 1. Code Style | ||
|
||
Refer to the [Golang Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments) for the standard coding style. This document provides detailed guidelines on best practices for writing Go code. | ||
|
||
## 2. Test Structure | ||
|
||
All tests should be placed in the same directory as the code they are testing. Each test file should follow the convention of ending with `_test.go`. | ||
|
||
Example: | ||
|
||
``` | ||
handlers/ | ||
user_handler.go | ||
user_handler_test.go | ||
``` | ||
|
||
|
||
## 3. Development Environment | ||
|
||
We recommend using Visual Studio Code (VsCode) with the official Golang extension for development. This extension includes linting, debugging, and other useful features. Ensure that the main Golang linter is enabled for consistent code quality. | ||
|
||
More about this in [DEVELOPMENT](REAMDE/DEVELOPMENT/DEVELOPMENT.md) |