Skip to content

Commit

Permalink
Draft Golang Conventions. (openpredictionmarkets#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
pwdel authored Aug 24, 2024
1 parent cc97cc1 commit 07255a5
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README/BACKEND/GOLANG_CONVENTIONS.md
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)

0 comments on commit 07255a5

Please sign in to comment.