-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from btnguyen2k/dev
Test release
- Loading branch information
Showing
7 changed files
with
244 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) <year> <your name> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,42 @@ | ||
# go-module-template | ||
|
||
Template to quickly spin up a Go module project | ||
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) | ||
[![Actions Status](https://github.com/btnguyen2k/go-module-template/workflows/ci/badge.svg)](https://github.com/btnguyen2k/go-module-template/actions) | ||
[![Release](https://img.shields.io/github/release/btnguyen2k/go-module-template.svg?style=flat-square)](RELEASE-NOTES.md) | ||
|
||
Template to quickly spin up a Go module project. | ||
|
||
## Features | ||
|
||
- [Go modules](https://blog.golang.org/using-go-modules) enabled. | ||
- Template for README, LICENSE, RELEASE-NOTES, and .gitignore files. | ||
- GitHub actions included: | ||
- `dependabot.yaml`, `automerge-dependabot.yaml`: automatically update dependencies and merge PRs from dependabot. | ||
- `ci.yaml`: automatically run tests and generate code coverage report. | ||
- `release.yaml`: automatically create a new release. | ||
|
||
**Default workflow** | ||
|
||
- Dependencies are checked and updated weekly by `dependabot.yaml`, and then PRs are automatically merged to `main` branch by `automerge-dependabot.yaml`. | ||
- `ci.yaml` is triggered on every push to any branch to run tests and generate code coverage report. | ||
- Once PR is approved and merged to `release` branch, `release.yaml` is triggered to create a new release. Then a new PR is created to merge `release` branch to `main` branch. | ||
|
||
## Usage | ||
|
||
1. Create new project from this template: | ||
- Click on the `Use this template` button to create a new repository from this template. | ||
- Or use the `gh` command line tool: `gh repo create <your-repository> --template btnguyen2k/go-module-template` | ||
- (Less preferred method) Or simply clone/fork this repository. | ||
2. Update `go.mod` and `module.go` file to reflect your module name and required Go version. | ||
3. Review other source code and test files, either update them to reflect your module's name and functionality or remove them. | ||
4. `LICENSE.tpl.md`, `README.tpl.md` and `RELEASE-NOTES.tpl.md` files are templates. Update them to reflect your module's name and functionality. Then rename them to `LICENSE.md`, `README.md` and `RELEASE-NOTES.md`. | ||
5. Update other files to suit your needs. | ||
6. Happy coding! | ||
|
||
## License | ||
|
||
This template is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details. | ||
|
||
## Contributing & Support | ||
|
||
Feel free to create [pull requests](https://github.com/btnguyen2k/go-module-template/pulls) or [issues](https://github.com/btnguyen2k/go-module-template/issues) to report bugs or suggest new features. If you find this project useful, please start it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# <Your Module Name> | ||
|
||
[![Go Report Card](https://goreportcard.com/badge/github.com/<your-username>/<your-repository>)](https://goreportcard.com/report/github.com/<your-username>/<your-repository>) | ||
[![PkgGoDev](https://pkg.go.dev/badge/github.com/<your-username>/<your-repository>)](https://pkg.go.dev/github.com/<your-username>/<your-repository>) | ||
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) | ||
[![Actions Status](https://github.com/<your-username>/<your-repository>/workflows/ci/badge.svg)](https://github.com/<your-username>/<your-repository>/actions) | ||
[![codecov](https://codecov.io/gh/<your-username>/<your-repository>/branch/main/graph/badge.svg)](https://codecov.io/gh/<your-username>/<your-repository>) | ||
[![Release](https://img.shields.io/github/release/<your-username>/<your-repository>.svg?style=flat-square)](RELEASE-NOTES.md) | ||
|
||
A brief description of your Go module, its purpose, and any key features. | ||
|
||
## Installation | ||
|
||
To use this module in your Go project, you can use the `go get` command: | ||
|
||
```bash | ||
$ go get -u github.com/<your-username>/<your-repository> | ||
``` | ||
|
||
## Usage | ||
|
||
Explain how users can import and use your module in their Go projects. Provide code examples if necessary. | ||
|
||
```go | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"github.com/<your-username>/<your-repository>" | ||
) | ||
|
||
func main() { | ||
// Example usage | ||
fmt.Println(your_module_name.YourFunction()) | ||
} | ||
``` | ||
|
||
## Configuration | ||
|
||
If your module has configuration options, document them here. | ||
|
||
## Contributing | ||
|
||
Explain how others can contribute to your project. Include guidelines for reporting issues, submitting feature requests, and making pull requests. | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License - see the [LICENSE.tpl.md](LICENSE.tpl.md) file for details. | ||
|
||
## Acknowledgments | ||
|
||
Give credit to any contributors, libraries, or tools that your module depends on. | ||
|
||
## Contact | ||
|
||
Provide your contact information for users who may have questions or want to get in touch with you. | ||
|
||
## Release History | ||
|
||
See the [RELEASE-NOTES.tpl.md](RELEASE-NOTES.tpl.md) file for details. | ||
|
||
## Support | ||
|
||
If you encounter any issues or have questions, feel free to [create an issue](https://github.com/<your-username>/<your-repository>/issues). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# <Your Module Name> release notes | ||
|
||
## yyyy-MM-dd - v0.1.0 | ||
|
||
### Changed | ||
|
||
- Change: any change to existing functions | ||
|
||
### Added/Refactoring | ||
|
||
- Feature: new features | ||
- Added: new functions. | ||
- etc | ||
|
||
### Fixed/Improvement | ||
|
||
- Fix: Bug #123 | ||
|
||
### Others | ||
|
||
- Docs: documentation updates |
Oops, something went wrong.