Skip to content

Commit e6588de

Browse files
committed
Initial commit
0 parents  commit e6588de

22 files changed

+747
-0
lines changed

.circleci/config.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
version: 2.1
2+
3+
executors:
4+
golang:
5+
working_directory: /go/src/moul.io/golang-repo-template
6+
docker:
7+
- image: circleci/golang:1.12
8+
environment:
9+
GO111MODULE: "on"
10+
DOCKER_IMAGE: moul/golang-repo-template
11+
12+
docker:
13+
docker:
14+
- image: docker:18.06.3-ce-git
15+
16+
orbs:
17+
codecov: codecov/[email protected]
18+
moul: moul/[email protected]
19+
retry: moul/[email protected]
20+
docker: circleci/[email protected]
21+
22+
tools: gotest/[email protected]
23+
24+
jobs:
25+
go-build:
26+
executor: golang
27+
steps:
28+
- checkout
29+
- retry/install
30+
- tools/mod-download
31+
- tools/mod-tidy-check
32+
- run: retry -m 3 make install
33+
- run: retry -m 3 make unittest
34+
- moul/install_golangci-lint
35+
- run: PATH=$PATH:$(pwd)/bin retry -m 3 make lint
36+
- codecov/upload:
37+
file: coverage.txt
38+
39+
docker-build:
40+
executor: docker
41+
steps:
42+
- checkout
43+
- setup_remote_docker:
44+
docker_layer_caching: true
45+
- docker/build:
46+
image: moul/golang-repo-template
47+
#- docker/dockerlint
48+
49+
workflows:
50+
main:
51+
jobs:
52+
- go-build
53+
- docker-build

.dockerignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
##
2+
## Specific to .dockerignore
3+
##
4+
5+
.git/
6+
Dockerfile
7+
contrib/
8+
9+
##
10+
## Common with .gitignore
11+
##
12+
13+
# Temporary files
14+
*~
15+
*#
16+
.#*
17+
18+
# Vendors
19+
node_modules/
20+
vendor/
21+
22+
# Binaries for programs and plugins
23+
dist/
24+
gin-bin
25+
*.exe
26+
*.exe~
27+
*.dll
28+
*.so
29+
*.dylib
30+
31+
# Test binary, build with `go test -c`
32+
*.test
33+
34+
# Output of the go coverage tool, specifically when used with LiteIDE
35+
*.out

.editorconfig

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
6+
end_of_line = lf
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
10+
indent_style = space
11+
indent_size = 4
12+
13+
[Makefile]
14+
indent_style = tab
15+
16+
[*.go]
17+
indent_style = tab
18+
19+
[*.proto]
20+
indent_size = 2
21+
22+
[*.swift]
23+
indent_size = 4
24+
25+
[*.tmpl]
26+
indent_size = 2
27+
28+
[*.js]
29+
indent_size = 2
30+
block_comment_start = /*
31+
block_comment_end = */
32+
33+
[*.html]
34+
indent_size = 2
35+
36+
[*.bat]
37+
end_of_line = crlf
38+
39+
[*.{json,yml}]
40+
indent_size = 2
41+
42+
[.{babelrc,eslintrc}]
43+
indent_size = 2
44+
45+
[{Fastfile,.buckconfig,BUCK}]
46+
indent_size = 2
47+
48+
[*.diff]
49+
indent_size = 1
50+
51+
[*.m]
52+
indent_size = 1
53+
indent_style = space
54+
block_comment_start = /**
55+
block_comment = *
56+
block_comment_end = */
57+
58+
[*.java]
59+
indent_size = 4
60+
indent_style = space
61+
block_comment_start = /**
62+
block_comment = *
63+
block_comment_end = */

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Collapse vendored and generated files on GitHub
5+
vendor/* linguist-vendored
6+
*/vendor/* linguist-vendored
7+
*.gen.* linguist-generated
8+
*.pb.go linguist-generated
9+
10+
# Reduce conflicts on markdown files
11+
*.md merge=union

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @moul

.github/FUNDING.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#github: ["moul"]
2+
patreon: moul
3+
open_collective: moul
4+
custom:
5+
- "https://www.buymeacoffee.com/moul"
6+
- "https://manfred.life/donate"

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Temporary files
2+
*~
3+
*#
4+
.#*
5+
coverage.txt
6+
7+
# Vendors
8+
node_modules/
9+
vendor/
10+
11+
# Binaries for programs and plugins
12+
dist/
13+
gin-bin
14+
*.exe
15+
*.exe~
16+
*.dll
17+
*.so
18+
*.dylib
19+
20+
# Test binary, build with `go test -c`
21+
*.test
22+
23+
# Output of the go coverage tool, specifically when used with LiteIDE
24+
*.out

.golangci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
run:
2+
deadline: 1m
3+
tests: false
4+
#skip-files:
5+
# - ".*\\.gen\\.go"
6+
7+
linters-settings:
8+
golint:
9+
min-confidence: 0
10+
maligned:
11+
suggest-new: true
12+
goconst:
13+
min-len: 5
14+
min-occurrences: 4
15+
misspell:
16+
locale: US
17+
18+
linters:
19+
disable-all: true
20+
enable:
21+
- goconst
22+
- misspell
23+
- deadcode
24+
- misspell
25+
- structcheck
26+
- errcheck
27+
- unused
28+
- varcheck
29+
- staticcheck
30+
- unconvert
31+
- gofmt
32+
- goimports
33+
- golint
34+
- ineffassign

.goreleaser.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
before:
2+
hooks:
3+
- go mod download
4+
builds:
5+
-
6+
goos: [linux, darwin, windows]
7+
goarch: [386, amd64, arm, arm64]
8+
flags:
9+
- "-a"
10+
ldflags:
11+
- '-extldflags "-static"'
12+
env:
13+
- CGO_ENABLED=0
14+
archives:
15+
- wrap_in_directory: true
16+
replacements:
17+
darwin: Darwin
18+
linux: Linux
19+
windows: Windows
20+
386: i386
21+
amd64: x86_64
22+
checksum:
23+
name_template: 'checksums.txt'
24+
snapshot:
25+
name_template: "{{ .Tag }}-next"
26+
changelog:
27+
sort: asc
28+
filters:
29+
exclude:
30+
- '^docs:'
31+
- '^test:'
32+
brew:
33+
name: golang-repo-template
34+
github:
35+
owner: moul
36+
name: homebrew-moul
37+
commit_author:
38+
name: moul-bot
39+
40+
homepage: https://manfred.life/
41+
description: "golang-repo-template"

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

0 commit comments

Comments
 (0)