Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 695 Bytes

how-to-create-a-go-module.md

File metadata and controls

35 lines (21 loc) · 695 Bytes

How to create a new Go module

NOTE: In the below examples we will be creating a module called basketball.

Set up the new module

Create the new directory for your module:

mkdir pkg/basketball

Move into your new directory:

cd pkg/basketball

Initialize your new module:

go mod init github.com/jgkawell/galactus/pkg/basketball

Write the module code

Write out all your code for your module according to business needs.

Tests

Write your unit tests along side your module code: How to write unit tests

Open a PR

Open your PR to main following the PR guidelines here.