Skip to content

Commit 54e02d8

Browse files
authored
Merge pull request #1590 from gofr-dev/release/v1.35.2
Release/v1.35.2
2 parents 18d39b0 + 150f0c9 commit 54e02d8

File tree

65 files changed

+1781
-275
lines changed

Some content is hidden

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

65 files changed

+1781
-275
lines changed

Diff for: .github/workflows/go.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ jobs:
9999
export APP_ENV=test
100100
# Run tests for the examples directory with coverage
101101
go test gofr.dev/examples/... -v -short -coverprofile packageWithpbgo.cov -coverpkg=gofr.dev/examples/...
102-
# Filter out generated protobuf files from coverage report
103-
grep -vE '^gofr\.dev\/.*\.pb\.go' packageWithpbgo.cov > profile.cov
102+
# Filter out auto-generated files by protobuf and gofr framework from coverage report
103+
grep -vE '^gofr\.dev\/.*(\.pb\.go|hello\.proto|hello_grpc\.pb\.go|health_client\.go|hello_client\.go|hello_gofr\.go|health_gofr\.go)' packageWithpbgo.cov > profile.cov
104104
# Display coverage statistics
105105
go tool cover -func profile.cov
106106
@@ -147,11 +147,13 @@ jobs:
147147
command: |
148148
export APP_ENV=test
149149
# Run tests for the pkg directory with coverage
150-
go test gofr.dev/pkg/... -v -short -coverprofile package.cov -coverpkg=gofr.dev/pkg/...
150+
cd pkg
151+
go test ./... -v -short -coverprofile package.cov -coverpkg=./...
151152
# Filter out mock files from coverage report
152153
grep -v '/mock_' package.cov > profile.cov
154+
mv profile.cov ../profile.cov
153155
# Display coverage statistics
154-
go tool cover -func profile.cov
156+
go tool cover -func ../profile.cov
155157
156158
# Upload coverage report for the 1.24 Go version only
157159
- name: Upload Test Coverage

Diff for: docs/advanced-guide/serving-static-files/page.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ func main() {
3535
```
3636

3737
Additionally, if we want to serve more static endpoints, we have a dedicated function called `AddStaticFiles()`
38-
which takes 2 parameters `endpoint` and the `filepath` of the static folder which we want to serve.
38+
which takes 2 parameters `endpoint` and the `filepath` of the static folder which we want to serve. If the folder
39+
contains a `404.html` file, GoFr automatically serves it for any missing URL, redirecting all "Not Found" requests
40+
to this page.
3941

4042
Example project structure:
4143

@@ -54,6 +56,7 @@ project_folder
5456
| |---js
5557
| | main.js
5658
| | index.html
59+
| | 404.html
5760
| main.go
5861
| main_test.go
5962
```

Diff for: docs/advanced-guide/using-publisher-subscriber/page.md

+80-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,79 @@ that are specific for the type of message broker user wants to use.
9696
- `-`
9797
- `1000`
9898
- `300`
99-
- Positive int
99+
- Positive int
100+
101+
---
102+
103+
- `KAFKA_SECURITY_PROTOCOL`
104+
- Security protocol used to communicate with Kafka (e.g., PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL).
105+
- `-`
106+
- `PLAINTEXT`
107+
- `SASL_SSL`
108+
- String
109+
110+
---
111+
112+
- `KAFKA_SASL_MECHANISM`
113+
- SASL mechanism for authentication (e.g., PLAIN, SCRAM-SHA-256, SCRAM-SHA-512).
114+
- `-`
115+
- `""`
116+
- `PLAIN`
117+
- String
118+
119+
---
120+
121+
- `KAFKA_SASL_USERNAME`
122+
- Username for SASL authentication.
123+
- `-`
124+
- `""`
125+
- `user`
126+
- String
127+
128+
---
129+
130+
- `KAFKA_SASL_PASSWORD`
131+
- Password for SASL authentication.
132+
- `-`
133+
- `""`
134+
- `password`
135+
- String
136+
137+
---
138+
139+
- `KAFKA_TLS_CERT_FILE`
140+
- Path to the TLS certificate file.
141+
- `-`
142+
- `""`
143+
- `/path/to/cert.pem`
144+
- Path
145+
146+
---
147+
148+
- `KAFKA_TLS_KEY_FILE`
149+
- Path to the TLS key file.
150+
- `-`
151+
- `""`
152+
- `/path/to/key.pem`
153+
- Path
154+
155+
---
156+
157+
- `KAFKA_TLS_CA_CERT_FILE`
158+
- Path to the TLS CA certificate file.
159+
- `-`
160+
- `""`
161+
- `/path/to/ca.pem`
162+
- Path
163+
164+
---
165+
166+
- `KAFKA_TLS_INSECURE_SKIP_VERIFY`
167+
- Skip TLS certificate verification.
168+
- `-`
169+
- `false`
170+
- `true`
171+
- Boolean
100172

101173
{% /table %}
102174

@@ -107,7 +179,13 @@ CONSUMER_ID=order-consumer
107179
KAFKA_BATCH_SIZE=1000
108180
KAFKA_BATCH_BYTES=1048576
109181
KAFKA_BATCH_TIMEOUT=300
110-
```
182+
KAFKA_SASL_MECHANISM=PLAIN
183+
KAFKA_SASL_USERNAME=user
184+
KAFKA_SASL_PASSWORD=password
185+
KAFKA_TLS_CERT_FILE=/path/to/cert.pem
186+
KAFKA_TLS_KEY_FILE=/path/to/key.pem
187+
KAFKA_TLS_CA_CERT_FILE=/path/to/ca.pem
188+
KAFKA_TLS_INSECURE_SKIP_VERIFY=true
111189
112190
#### Docker setup
113191
```shell

Diff for: docs/references/configs/page.md

+32
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,14 @@ This document lists all the configuration options supported by the GoFr framewor
299299

300300
---
301301

302+
---
303+
304+
- KAFKA_SECURITY_PROTOCOL
305+
- Security protocol used to communicate with Kafka (e.g., PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL)
306+
- PLAINTEXT
307+
308+
---
309+
302310

303311
- KAFKA_SASL_MECHANISM
304312
- SASL mechanism for authentication (e.g. PLAIN, SCRAM-SHA-256, SCRAM-SHA-512)
@@ -316,6 +324,30 @@ This document lists all the configuration options supported by the GoFr framewor
316324
- Password for SASL authentication
317325
- None
318326

327+
---
328+
329+
- KAFKA_TLS_CERT_FILE
330+
- Path to the TLS certificate file
331+
- None
332+
333+
---
334+
335+
- KAFKA_TLS_KEY_FILE
336+
- Path to the TLS key file
337+
- None
338+
339+
---
340+
341+
- KAFKA_TLS_CA_CERT_FILE
342+
- Path to the TLS CA certificate file
343+
- None
344+
345+
---
346+
347+
- KAFKA_TLS_INSECURE_SKIP_VERIFY
348+
- Skip TLS certificate verification
349+
- false
350+
319351
{% /table %}
320352

321353
**Google**

Diff for: examples/grpc/grpc-server/main_test.go

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"context"
5+
"os"
56
"testing"
67
"time"
78

@@ -14,6 +15,11 @@ import (
1415
"gofr.dev/pkg/gofr/testutil"
1516
)
1617

18+
func TestMain(m *testing.M) {
19+
os.Setenv("GOFR_TELEMETRY", "false")
20+
m.Run()
21+
}
22+
1723
func TestGRPCServer(t *testing.T) {
1824
configs := testutil.NewServerConfigs(t)
1925
host := configs.GRPCHost

Diff for: examples/http-server-using-redis/main_test.go

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"context"
66
"fmt"
77
"net/http"
8+
"os"
89
"testing"
910
"time"
1011

@@ -21,6 +22,11 @@ import (
2122
"gofr.dev/pkg/gofr/testutil"
2223
)
2324

25+
func TestMain(m *testing.M) {
26+
os.Setenv("GOFR_TELEMETRY", "false")
27+
m.Run()
28+
}
29+
2430
func TestHTTPServerUsingRedis(t *testing.T) {
2531
configs := testutil.NewServerConfigs(t)
2632

Diff for: examples/http-server/main_test.go

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"encoding/json"
66
"io"
77
"net/http"
8+
"os"
89
"strconv"
910
"testing"
1011
"time"
@@ -21,6 +22,11 @@ import (
2122
"gofr.dev/pkg/gofr/testutil"
2223
)
2324

25+
func TestMain(m *testing.M) {
26+
os.Setenv("GOFR_TELEMETRY", "false")
27+
m.Run()
28+
}
29+
2430
func TestIntegration_SimpleAPIServer(t *testing.T) {
2531
host := "http://localhost:9000"
2632

Diff for: examples/sample-cmd/main_test.go

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ import (
1616
"gofr.dev/pkg/gofr/testutil"
1717
)
1818

19+
func TestMain(m *testing.M) {
20+
os.Setenv("GOFR_TELEMETRY", "false")
21+
m.Run()
22+
}
23+
1924
// TestCMDRunWithNoArg checks that if no subcommand is found then error comes on stderr.
2025
func TestCMDRunWithNoArg(t *testing.T) {
2126
expErr := "No Command Found!\n"

Diff for: examples/using-add-filestore/go.mod

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
module gofr.dev/examples/using-add-filestore
22

33
go 1.22.7
4-
5-
toolchain go1.23.4
4+
toolchain go1.24.0
65

76
require (
87
github.com/stretchr/testify v1.10.0
@@ -80,14 +79,14 @@ require (
8079
go.opentelemetry.io/otel/sdk/metric v1.34.0 // indirect
8180
go.opentelemetry.io/otel/trace v1.34.0 // indirect
8281
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
83-
golang.org/x/crypto v0.32.0 // indirect
82+
golang.org/x/crypto v0.35.0 // indirect
8483
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect
85-
golang.org/x/net v0.34.0 // indirect
84+
golang.org/x/net v0.36.0 // indirect
8685
golang.org/x/oauth2 v0.25.0 // indirect
87-
golang.org/x/sync v0.10.0 // indirect
88-
golang.org/x/sys v0.29.0 // indirect
89-
golang.org/x/term v0.28.0 // indirect
90-
golang.org/x/text v0.21.0 // indirect
86+
golang.org/x/sync v0.11.0 // indirect
87+
golang.org/x/sys v0.30.0 // indirect
88+
golang.org/x/term v0.29.0 // indirect
89+
golang.org/x/text v0.22.0 // indirect
9190
golang.org/x/time v0.9.0 // indirect
9291
google.golang.org/api v0.217.0 // indirect
9392
google.golang.org/genproto v0.0.0-20250106144421-5f5ef82da422 // indirect

0 commit comments

Comments
 (0)