Skip to content

Commit 5783131

Browse files
Merge pull request #221 from gofr-dev/RELEASE/v0.1.0
Release/v0.1.0
2 parents 0d51eae + 078beed commit 5783131

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+3400
-689
lines changed

.github/workflows/go.yml

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ jobs:
1818
redis:
1919
image: redis:7.0.5
2020
ports:
21-
- "6379:6379"
21+
- "2002:6379"
2222
options: "--entrypoint redis-server"
2323

2424
mysql:
25-
image: mysql:8.0.30
25+
image: mysql:8.2.0
2626
ports:
27-
- "3306:3306"
27+
- "2001:3306"
2828
env:
2929
MYSQL_ROOT_PASSWORD: "password"
3030
MYSQL_DATABASE: "test"
@@ -61,19 +61,19 @@ jobs:
6161
name: PKG Unit Testing🛠
6262
runs-on: ubuntu-latest
6363
services:
64-
mysql:
65-
image: mysql:8.0.30
66-
ports:
67-
- "3306:3306"
68-
env:
69-
MYSQL_ROOT_PASSWORD: "password"
70-
7164
redis:
7265
image: redis:7.0.5
7366
ports:
74-
- "6379:6379"
67+
- "2002:6379"
7568
options: "--entrypoint redis-server"
7669

70+
mysql:
71+
image: mysql:8.2.0
72+
ports:
73+
- "2001:3306"
74+
env:
75+
MYSQL_ROOT_PASSWORD: "password"
76+
MYSQL_DATABASE: "test"
7777
steps:
7878
- name: Checkout code into go module directory
7979
uses: actions/checkout@v4
@@ -120,19 +120,19 @@ jobs:
120120
run: |
121121
awk '!/^mode: / && FNR==1{print "mode: set"} {print}' ./Example-Test-Report/profile.cov > merged_profile.cov
122122
tail -n +2 ./PKG-Coverage-Report/profile.cov >> merged_profile.cov
123-
123+
124124
- name: Parse code-coverage value
125125
working-directory: artifacts
126126
run: |
127127
codeCoverage=$(go tool cover -func=merged_profile.cov | grep total | awk '{print $3}')
128128
codeCoverage=${codeCoverage%?}
129129
echo "CODE_COVERAGE=$codeCoverage" >> $GITHUB_ENV
130-
131-
# - name: Check if code-coverage is greater than threshold
132-
# run: |
133-
# codeCoverage=${{ env.CODE_COVERAGE }}
134-
# codeCoverage=${codeCoverage%??}
135-
# if [[ $codeCoverage -lt 92 ]]; then echo "code coverage cannot be less than 92%, currently its ${{ env.CODE_COVERAGE }}%" && exit 1; fi;
130+
131+
# - name: Check if code-coverage is greater than threshold
132+
# run: |
133+
# codeCoverage=${{ env.CODE_COVERAGE }}
134+
# codeCoverage=${codeCoverage%??}
135+
# if [[ $codeCoverage -lt 92 ]]; then echo "code coverage cannot be less than 92%, currently its ${{ env.CODE_COVERAGE }}%" && exit 1; fi;
136136

137137
upload_coverage:
138138
name: Upload Coverage📊
@@ -151,8 +151,7 @@ jobs:
151151
- name: Merge Coverage Files
152152
working-directory: artifacts
153153
run: |
154-
awk '!/^mode: / && FNR==1{print "mode: set"} {print}' ./CMD-Test-Report/profile.cov > merged_profile.cov
155-
tail -n +2 ./Example-Test-Report/profile.cov >> merged_profile.cov
154+
awk '!/^mode: / && FNR==1{print "mode: set"} {print}' ./Example-Test-Report/profile.cov > merged_profile.cov
156155
tail -n +2 ./PKG-Coverage-Report/profile.cov >> merged_profile.cov
157156
158157
@@ -175,4 +174,4 @@ jobs:
175174
run: go get -v -t -d ./...
176175
- name: GolangCI-Lint
177176
run: |
178-
golangci-lint run --timeout 9m0s
177+
golangci-lint run --timeout 9m0s

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,17 @@
88
# Test binary, built with `go test -c`
99
*.test
1010

11+
1112
# Output of the go coverage tool, specifically when used with LiteIDE
1213
*.out
14+
coverage.txt
1315

1416
# Dependency directories (remove the comment below to include it)
1517
vendor/
1618

17-
.idea
19+
.idea
20+
*.impl
21+
22+
# IDE Cache
23+
.vscode
24+
.DS_Store

.golangci.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ linters-settings:
4949
misspell:
5050
locale: US
5151
nolintlint:
52-
allow-leading-space: false # require machine-readable nolint directives (i.e. with no leading space)
5352
allow-unused: false # report any unused nolint directives
5453
require-explanation: true # require an explanation for nolint directives
5554
require-specific: true # require nolint directives to be specific about which linter is being skipped
@@ -61,11 +60,11 @@ linters:
6160
enable:
6261
- asciicheck
6362
- bodyclose
64-
- deadcode
6563
- dogsled
6664
- dupl
6765
- errcheck
6866
- exhaustive
67+
- exportloopref
6968
- funlen
7069
- gochecknoglobals
7170
- gochecknoinits
@@ -77,32 +76,26 @@ linters:
7776
- goerr113
7877
- gofmt
7978
- goimports
80-
- golint
8179
- gomnd
8280
- goprintffuncname
8381
- gosec
8482
- gosimple
8583
- govet
8684
- ineffassign
87-
- interfacer
8885
- lll
89-
- maligned
9086
- misspell
9187
- nakedret
9288
- nestif
9389
- noctx
9490
- nolintlint
9591
- prealloc
92+
- revive
9693
- rowserrcheck
97-
- scopelint
9894
- staticcheck
99-
- structcheck
10095
- stylecheck
101-
- typecheck
10296
- unconvert
10397
- unparam
10498
- unused
105-
- varcheck
10699
- whitespace
107100
- wsl
108101

@@ -112,7 +105,7 @@ linters:
112105

113106

114107
service:
115-
golangci-lint-version: 1.37.x
108+
golangci-lint-version: 1.55.x
116109

117110
issues:
118111
# exclude-use-default: false

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
support[at]gofr.dev.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

0 commit comments

Comments
 (0)