Go module template with instructions on how to make your code importable and setting up codecov CI.
How to install package with newer versions of Go (+1.16):
go mod download github.com/soypat/go-module-template@latestReplace LICENSE with your desired license. BSD 3 clause is included by default.
Fix
go.modfile by replacinggithub.com/YOURUSER/YOURREPONAMEwith your corresponding project repository link.Replace
soypat/go-module-templatein the badge URLs. Make sure you've replaced all of them by performing text search in the readme forsoypatandtemplate.Rename
module.goandmodule_test.goto fit your own repository needs. Below are some exemplary modules that abide by what's generally considered "good practices":mu8minimal machine learning library. Note how most interfaces and interface algorithms are defined at the root package level and how the concrete implementations live in the subdirectories.- Similarily
sdfalso does the same with defining interfaces top level.
This instructive will allow for tests to run on pull requests and pushes to your repository.
Create an account on codecov.io
Setup repository on codecov and obtain the CODECOV_TOKEN token, which is a string of base64 characters.
Open up the github repository for this project and go to
Settings -> Secrets and variables -> Actions. Once there create a New Repository Secret. Name itCODECOV_TOKENand copy paste the token obtained in the previous step in thesecretinput box. Click "Add secret".