Golocron
The Style Guide
1.
Project Layout
1.1.
Good and Bad Layout
1.2.
Types of Layouts
1.3.
Common
1.4.
Library
1.5.
Single Application
1.6.
Monolithic Repository
1.7.
Monorepo: Additional Chapters
1.8.
Versioning and Go
1.9.
Notes on Release Notes
1.10.
Summary
2.
Package Layout
2.1.
What is a Package
2.2.
When to Create a Package
2.3.
Keep Public API as Narrow as Possible
2.4.
The Main Package
2.5.
Package Provides Something
2.6.
Naming a Package
2.7.
Structure
2.8.
Files in a Package
2.9.
Cross-Platform Code
2.9.1.
Basic Principles of Writing Cross-Platform Code
2.9.2.
Cross-Platform Options in Go
2.10.
Package and File Organisation
2.10.1.
Keep Platform-Dependent Code at Minimum
2.10.2.
Use Simple Branching in Trivial Cases
2.10.3.
No Platform-Specific Code in Main
2.10.4.
Use File Suffix by Default
2.10.5.
Use Build Tags in Mixed Cases
2.10.6.
An Advanced Example
2.10.7.
Strive for Platform-Independent Tests
2.10.8.
Provide Cross-Platform Tests Only When You Must
2.11.
Summary
3.
File Layout
Foundation
Application Design
Light
Rust (default)
Coal
Navy
Ayu
Golocron – Software Development With Go
Golocron – Software Development With Go
by Pavel Burmistrov
TBD.