-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c9092a9
Showing
28 changed files
with
749 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# all start with .(dot), including directories and files | ||
.* | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
compose.yml | ||
LICENSE* | ||
Makefile | ||
README.md |
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,14 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
max_line_length = 120 | ||
tab_width = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[{Makefile,*.go}] | ||
indent_style = tab |
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,44 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Bug description | ||
|
||
<!-- A clear and concise description of what the bug is. --> | ||
|
||
- Would you like to work on a fix? [y/n] | ||
|
||
## To Reproduce | ||
|
||
Steps to reproduce the behavior: | ||
|
||
1. ... | ||
2. ... | ||
3. ... | ||
4. ... | ||
|
||
<!-- Make sure you are able to reproduce the bug in the main branch, too. --> | ||
|
||
## Expected behavior | ||
|
||
<!-- A clear and concise description of what you expected to happen. --> | ||
|
||
## Screenshots | ||
|
||
<!-- If applicable, add screenshots to help explain your problem. --> | ||
|
||
## Environment | ||
|
||
<!-- Please fill the following information. --> | ||
|
||
- OS: [e.g. Ubuntu 20.04] | ||
- my-awesome-go-project version: [e.g. 0.1.0] | ||
|
||
## Additional context | ||
|
||
<!-- Add any other context about the problem here. --> |
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 @@ | ||
blank_issues_enabled: true |
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,28 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Motivations | ||
|
||
<!-- | ||
If your feature request is related to a problem, please describe it. | ||
--> | ||
|
||
- Would you like to implement this feature? [y/n] | ||
|
||
## Solution | ||
|
||
<!-- Describe the solution you'd like. --> | ||
|
||
## Alternatives | ||
|
||
<!-- Describe any alternative solutions or features you've considered. --> | ||
|
||
## Additional context | ||
|
||
<!-- Add any other context or screenshots about the feature request here. --> |
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,9 @@ | ||
<!-- Please explain the changes you made --> | ||
|
||
<!-- | ||
Please make sure: | ||
- you have read the contributing guidelines: | ||
https://github.com/x-pt/my-awesome-go-project/blob/main/docs/CONTRIBUTING.md | ||
- you have updated the changelog (if needed): | ||
https://github.com/x-pt/my-awesome-go-project/blob/main/CHANGELOG.md | ||
--> |
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,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
# Check for updates every Monday | ||
schedule: | ||
interval: "weekly" | ||
open-pull-requests-limit: 10 |
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,6 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"config:base" | ||
] | ||
} |
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,14 @@ | ||
name: CD # Continuous Deployment or Delivery | ||
|
||
on: | ||
push: | ||
# e.g. 1.0.0, v2.0.0, v0.1.0, v0.2.0-alpha, v0.3.0+build-71edf32 | ||
tags: | ||
- '[v]?[0-9]+\.[0-9]+\.[0-9]+.*' | ||
|
||
jobs: | ||
dd: | ||
name: Deploy or Delivery | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 |
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,25 @@ | ||
name: CI # Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 'stable' | ||
|
||
- name: Build | ||
run: make init && make build | ||
|
||
- name: Test | ||
run: make test |
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,51 @@ | ||
name: Build and Push Docker Image | ||
|
||
on: | ||
push: | ||
tags: | ||
- '^v[0-9]+\.[0-9]+\.[0-9]+.*$' | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
name: Build and Export to Docker | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
load: true | ||
tags: | | ||
ghcr.io/x-pt/my-awesome-go-project:latest | ||
ghcr.io/x-pt/my-awesome-go-project:${GITHUB_REF_NAME:1} | ||
- | ||
name: Test it before Push | ||
run: | | ||
docker run --rm ghcr.io/x-pt/my-awesome-go-project:latest | ||
docker run --rm ghcr.io/x-pt/my-awesome-go-project:${GITHUB_REF_NAME:1} | ||
- | ||
name: Build and Push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: | | ||
ghcr.io/x-pt/my-awesome-go-project:latest | ||
ghcr.io/x-pt/my-awesome-go-project:${GITHUB_REF_NAME:1} |
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 @@ | ||
### Custom | ||
.idea | ||
.vscode | ||
|
||
### Go template | ||
# Binaries for programs and plugins | ||
bin | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ |
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,19 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-merge-conflict | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
args: [ --fix=lf ] | ||
- id: trailing-whitespace | ||
- repo: https://github.com/commitizen-tools/commitizen | ||
rev: v3.18.4 | ||
hooks: | ||
- id: commitizen | ||
- repo: https://github.com/golangci/golangci-lint | ||
rev: v1.56.2 | ||
hooks: | ||
- id: golangci-lint |
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,19 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
### Added | ||
|
||
- support some features | ||
|
||
### Changed | ||
|
||
- change some existed behaviors/logic | ||
|
||
### Fixed | ||
|
||
- fix some bugs |
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,3 @@ | ||
# Code of Conduct | ||
|
||
This project adheres to the Go Code of Conduct, which can be found [here](https://go.dev/conduct). |
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,50 @@ | ||
# Contribution guidelines | ||
|
||
First off, thank you for considering contributing to `my-awesome-go-project`. | ||
|
||
If your contribution is not straightforward, please first discuss the change you | ||
wish to make by creating a new issue before making the change. | ||
|
||
## Reporting issues | ||
|
||
Before reporting an issue on the | ||
[issue tracker](https://github.com/x-pt/my-awesome-go-project/issues), | ||
please check that it has not already been reported by searching for some related | ||
keywords. | ||
|
||
## Pull requests | ||
|
||
Try to do one pull request per change. | ||
|
||
### Updating the changelog | ||
|
||
Update the changes you have made in | ||
[CHANGELOG](CHANGELOG.md) | ||
file under the **Unreleased** section. | ||
|
||
Add the changes of your pull request to one of the following subsections, | ||
depending on the types of changes defined by | ||
[Keep a changelog](https://keepachangelog.com/en/1.0.0/): | ||
|
||
- `Added` for new features. | ||
- `Changed` for changes in existing functionality. | ||
- `Deprecated` for soon-to-be removed features. | ||
- `Removed` for now removed features. | ||
- `Fixed` for any bug fixes. | ||
- `Security` in case of vulnerabilities. | ||
|
||
If the required subsection does not exist yet under **Unreleased**, create it! | ||
|
||
## Developing | ||
|
||
### Set up | ||
|
||
This is no different from other Go projects. | ||
|
||
```shell | ||
git clone https://github.com/x-pt/my-awesome-go-project | ||
cd my-awesome-go-project | ||
make test | ||
``` | ||
|
||
### Useful Commands |
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,10 @@ | ||
FROM golang:1.22-alpine AS builder | ||
|
||
LABEL author="X Author Name" | ||
|
||
# Set necessary environmet variables needed for our image | ||
# Such as: | ||
# ENV GO111MODULE=on | ||
# ENV CGO_ENABLED=0 | ||
# ENV GOOS=linux | ||
# ENV GOARCH=amd64 |
Oops, something went wrong.