Skip to content

templ-project/go

Repository files navigation

Templ Go

HitCount Contributions welcome Go Version TravisCI

Sonarcloud Status SonarCloud Coverage SonarCloud Bugs SonarCloud Vulnerabilities

Donate to this project using Patreon Donate to this project using Paypal

GoLang logo

Any fool can write code that a computer can understand. Good programmers write code that humans can understand. – Martin Fowler

go is a template, designed by Templ Project

go includes instructions for initializing a new Go Lang project, and configuring it for development, unit testing as well as code linting and analysis.

go extends templ/generic

go implements:

Getting Started

Prereqiusites / Dependencies

For Windows
For Linux/Unix/OSX
  • Please install git and make
# i.e debian
sudo apt-get install git make -y
# i.e mac OS
brew install make git

Known Issues / Troubleshooting

  • When developing, golangci-lint will not be available on Windows.

Installation

  1. Clone the project
  2. Remove .git folder
  3. Re-initialize your git repository
  4. Run make init nitialize the project to be a module or an application
  5. Run make configure to configure project
  6. Run make to see all your pre-implemented options
git clone https://github.com/templ-project/go your_project
cd your_project
rm -rf .git
git init
git remote add origin https://github.com/your-organisation/your-project
make init PROJECT_PREFIX=github.com/your-organisation PROJECT=your_project
# make init PROJECT_PREFIX=github.com/your-organisation PROJECT=your_project MODE=app
make configure
git add .
# git commit ...
# make

Development

Testing

Run unit tests using make test.

Single Tests

Run single unit tests file, by calling make test-single TEST_PATH=./path/to/file/...

make test-single TEST_PATH=./src/greet/...

Deployment

Adapt release directive in your Makefile to fit your needs.

make release will know how to increment version and create tags on its own.

Authors

Issues / Support

Add a set of links to the issues page/website, so people can know where to add issues/bugs or ask for support.

License

(If the package is public, add licence) This project is licensed under the MIT License - see the LICENSE.md file for details

Remove Everything above this line


Project Title

TravisCI

One Paragraph of project description goes here

Getting Started

Prereqiusites / Dependencies

What things you need to install the software and how to install them (based on each OS type).

For Windows

# Give Examples

npm install -g node-gyp windows-build-tools
# Warning: Please note windows-build-tools will install MSVS which takes a 
# LONG amount of time.

For Linux

# Give Examples

apt-get install build-essential mono
npm install -y node-gyp

Known Issues / Troubleshooting

Describe a list of known issues, and how to bypass them.

Installation

A step by step series of examples that tell you how to get a development env running

Say what the step will be

Give the example

And repeat

until finished

End with an example of getting some data out of the system or using it for a little demo

Development

Explain any development process for the project, if necesary

give examples

Testing

Explain how to run the automated tests for this system

Break down into (at least) unit tests

Explain what these tests test and why

Give an example

and end to end tests

Explain what these tests test and why

Give an example

And coding style tests

Explain what these tests test and why

Give an example

Deployment

Add additional notes about how to deploy this on a live system

Authors

See also the list of contributors who participated in this project.

Issues / Support

Add a set of links to the issues page/website, so people can know where to add issues/bugs or ask for support.

License

(If the package is public, add licence) This project is licensed under the MIT License - see the LICENSE.md file for details

Changelog

Small changelog history. The rest should be added to CHANGELOG.md.

See here a template for changelogs: https://keepachangelog.com/en/1.0.0/

Also see this tool for automatically generating them: https://www.npmjs.com/package/changelog