Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoszmajsak committed Sep 17, 2019
0 parents commit e4fb750
Show file tree
Hide file tree
Showing 24 changed files with 1,732 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: 2.1

jobs:
## Regular build running unit tests and linters
build:
working_directory: /go/src/github.com/bartoszmajsak/template-golang
docker:
- image: circleci/golang:1.12.9
steps:
- checkout
- restore_cache:
keys:
- vendor-cache-{{ checksum "Gopkg.lock" }}
- run:
name: "Runs the build"
command: make build-ci
- save_cache:
key: vendor-cache-{{ checksum "Gopkg.lock" }}
paths:
- ./vendor

workflows:
version: 2.1
circleci_build:
jobs:
- build
9 changes: 9 additions & 0 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Configures dependabot dependency updates
# For details, see: https://dependabot.com/docs/config-file/
version: 1
update_configs:
- package_manager: "go:dep"
directory: "/"
update_schedule: "weekly"
version_requirement_updates: "increase_versions"
default_reviewers: [ bartoszmajsak ]
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
; http://editorconfig.org/

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
max_line_length = off

[*.{adoc, md}]
trim_trailing_whitespace = false

[{*.go, Makefile}]
indent_style = tab
indent_size = 4
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Bug report
about: Use this issue type to report anything unusual observed while using this project.
title: ''
labels: bug
assignees: ''

---

<!--
Thanks for your interest in this project and apologies for making your experience not yet as awesome as we strive for.
Please follow the template provided below to report a bug you have encountered and we will make sure to improve it.
YOU CAN DELETE THIS TEXT BEFORE SUBMITTING THE ISSUE
-->

##### Issue Overview

Tell us briefly what the problem is about.

##### Expected Behaviour

##### Current Behaviour

##### Steps To Reproduce

1. [step 1]
2. [step 2]

##### Additional Information

Anything relevant to help us resolve the problem. For example:

* console log or any other relevant information from additional tools such as browser developer tools
* ....

For long outputs such as stack traces please use HTML5 `<details>`

```
<details>
<summary>$ uname -a</summary>
Darwin Bartoszs-MBP 17.7.0
Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018
root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
</details>
```
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature request
about: Use this issue type to share your ideas about improving user experience and functionalities.
title: ''
labels: enhancement
assignees: ''

---

<!--
Thanks for your interest in this project.
Please tell us what kind of enhancement you are looking for!
YOU CAN DELETE THIS TEXT BEFORE SUBMITTING THE ISSUE
-->

##### What can be improved

Tell us briefly what the idea is about.

##### Why

Why do you find this important or useful?
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--
Many thanks for contributing to this project!
Please tell us what this PR brings following the template we provided.
Also don't forget to link to the issue (or create one if there is none).
If you are still working on the change please but you would like our early feedback, please mark this pull request as draft
You can learn more about "Draft PRs" here https://github.blog/2019-02-14-introducing-draft-pull-requests/
YOU CAN DELETE THIS COMMENT :)
-->

#### Short description of what this resolves:


#### Changes proposed in this pull request:

-
-
-

Fixes #
128 changes: 128 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Test results
*ginkgo-test-results.xml

# Temporary Files
bin/
build/_output
build/_test
telepresence.log

# Vendor
vendor/
.vendor-new/

### Go ###
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, build with 'go test -c'
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

### Vim ###
# swap
.sw[a-p]
.*.sw[a-p]
# session
Session.vim
# temporary
.netrwhist
# auto-generated tag files
tags

### Emacs ###
# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*

# Org-mode
.org-id-locations
*_archive

# flymake-mode
*_flymake.*

# eshell files
/eshell/history
/eshell/lastdir

# elpa packages
/elpa/

# reftex files
*.rel

# AUCTeX auto folder
/auto/

# cask packages
.cask/
dist/

# Flycheck
flycheck_*.el

# server auth directory
/server/

# projectiles files
.projectile
projectile-bookmarks.eld

# directory configuration
.dir-locals.el

# saveplace
places

# url cache
url/cache/

# cedet
ede-projects.el

# smex
smex-items

# company-statistics
company-statistics-cache.el

# anaconda-mode
anaconda-mode/

### VisualStudioCode ###
.vscode
.history

### JetBrains IDEs (Goland) ###

.idea/
*.iws
*.ipr
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties


65 changes: 65 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
linters-settings:
govet:
check-shadowing: true
golint:
min-confidence: 0
gocyclo:
min-complexity: 12
dupl:
threshold: 128
goconst:
min-len: 2
min-occurrences: 2
depguard:
list-type: blacklist
packages:
# logging is allowed only by "sigs.k8s.io/controller-runtime/pkg/runtime/log"
- github.com/sirupsen/logrus
misspell:
locale: US
ignore-words:
- istio
- k8s
lll:
line-length: 180
goimports:
local-prefixes: github.com/bartoszmajsak/template-golang
gocritic:
enabled-tags:
- performance
- style
- experimental
disabled-checks:
- wrapperFunc
- commentFormatting # https://github.com/go-critic/go-critic/issues/755
unused:
check-exported: true

linters:
enable-all: true
disable:
- gochecknoinits # k8s/istio generated APIs are using init()
- gochecknoglobals # TODO discuss
- gofmt # We use goimports and when using them both leads to contradicting errors

run:
deadline: 10m
skip-dirs:
- ./pkg/apis
- ./pkg/assets/generated
- ./pkg/client/clientset

issues:
exclude-rules:
- path: pkg/openshift/
linters:
- dupl
- path: pkg/k8s/
linters:
- dupl

service:
project-path: github.com/bartoszmajsak/template-golang
golangci-lint-version: 1.17.x # Locks the version to avoid newly introduces linters
prepare:
- make lint-prepare
Loading

0 comments on commit e4fb750

Please sign in to comment.