From 0ce237aeae5841ff9a7b43a77e4b8ec4cb1e8286 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Fri, 10 Nov 2017 16:30:22 +0100 Subject: [PATCH] Improved code style --- CODE_STYLE.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CODE_STYLE.md b/CODE_STYLE.md index fb8a7f7c..dcfc32cd 100644 --- a/CODE_STYLE.md +++ b/CODE_STYLE.md @@ -2,6 +2,15 @@ This document is only meant to teach you the code style used in this project and will not explain *why* this coding style is used. +* [Tabs vs Spaces](#tabs-vs-spaces) +* [Empty line between blocks and statements](#empty-line-between-blocks-and-statements) +* [Variable names](#variable-names) +* [Types at the top](#types-at-the-top) +* [Private fields at the end of a struct](#private-fields-at-the-end-of-a-struct) +* [Package names](#package-names) +* [Use gofmt](#use-gofmt) +* [Code editor](#code-editor) + ## Tabs vs Spaces Use tabs for indentation and spaces for alignment: @@ -16,7 +25,7 @@ type AnimeTitle struct { } ``` -## Add an empty line between blocks and other statements +## Empty line between blocks and statements Bad: