Skip to content

Commit 4bcc782

Browse files
authored
Merge pull request #2047 from gofr-dev/release/v1.42.3
Release/v1.42.3
2 parents b5cd0c5 + b560a96 commit 4bcc782

File tree

25 files changed

+193
-123
lines changed

25 files changed

+193
-123
lines changed

docs/advanced-guide/http-authentication/page.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func main() {
2828

2929
app.EnableBasicAuth("admin", "secret_password") // Replace with your credentials
3030

31-
app.GET("/protected-resource", func(c *gofr.Context) (interface{}, error) {
31+
app.GET("/protected-resource", func(c *gofr.Context) (any, error) {
3232
// Handle protected resource access
3333
return nil, nil
3434
})
@@ -54,7 +54,7 @@ func main() {
5454

5555
app.EnableBasicAuthWithValidator(validateUser)
5656

57-
app.GET("/secure-data", func(c *gofr.Context) (interface{}, error) {
57+
app.GET("/secure-data", func(c *gofr.Context) (any, error) {
5858
// Handle access to secure data
5959
return nil, nil
6060
})
@@ -205,7 +205,7 @@ func main() {
205205
jwt.WithIssuer("https://auth.example.com")
206206
)
207207

208-
app.GET("/protected-resource", func(c *gofr.Context) (interface{}, error) {
208+
app.GET("/protected-resource", func(c *gofr.Context) (any, error) {
209209
// Handle protected resource access
210210
return nil, nil
211211
})

docs/advanced-guide/http-communication/page.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ svc := ctx.GetHTTPService(<service_name>)
6363
```
6464

6565
```go
66-
func Customer(ctx *gofr.Context) (interface{}, error) {
66+
func Customer(ctx *gofr.Context) (any, error) {
6767
// Get the payment service client
6868
paymentSvc := ctx.GetHTTPService("payment")
6969

docs/datasources/arangodb/page.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func main() {
8686
}
8787

8888
// Setup demonstrates database and collection creation
89-
func Setup(ctx *gofr.Context) (interface{}, error) {
89+
func Setup(ctx *gofr.Context) (any, error) {
9090
_, err := ctx.ArangoDB.CreateDocument(ctx, "social_network", "", nil)
9191
if err != nil {
9292
return nil, fmt.Errorf("failed to create database: %w", err)
@@ -122,7 +122,7 @@ func createCollection(ctx *gofr.Context, dbName, collectionName string) error {
122122
}
123123

124124
// CreateUserHandler demonstrates user management and document creation
125-
func CreateUserHandler(ctx *gofr.Context) (interface{}, error) {
125+
func CreateUserHandler(ctx *gofr.Context) (any, error) {
126126
name := ctx.PathParam("name")
127127

128128
// Create a person document
@@ -142,7 +142,7 @@ func CreateUserHandler(ctx *gofr.Context) (interface{}, error) {
142142
}
143143

144144
// CreateFriendship demonstrates edge document creation
145-
func CreateFriendship(ctx *gofr.Context) (interface{}, error) {
145+
func CreateFriendship(ctx *gofr.Context) (any, error) {
146146
var req struct {
147147
From string `json:"from"`
148148
To string `json:"to"`
@@ -172,7 +172,7 @@ func CreateFriendship(ctx *gofr.Context) (interface{}, error) {
172172
}
173173

174174
// GetEdgesHandler demonstrates fetching edges connected to a vertex
175-
func GetEdgesHandler(ctx *gofr.Context) (interface{}, error) {
175+
func GetEdgesHandler(ctx *gofr.Context) (any, error) {
176176
collection := ctx.PathParam("collection")
177177
vertexID := ctx.PathParam("vertexID")
178178

@@ -188,7 +188,7 @@ func GetEdgesHandler(ctx *gofr.Context) (interface{}, error) {
188188
return nil, fmt.Errorf("failed to get edges: %w", err)
189189
}
190190

191-
return map[string]interface{}{
191+
return map[string]any{
192192
"vertexID": vertexID,
193193
"edges": edges,
194194
}, nil

docs/references/gofrcli/page.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func NewGreetHandler(helloClient client.HelloGoFrClient) *GreetHandler {
172172
}
173173
}
174174

175-
func (g GreetHandler) Hello(ctx *gofr.Context) (interface{}, error) {
175+
func (g GreetHandler) Hello(ctx *gofr.Context) (any, error) {
176176
userName := ctx.Param("name")
177177
helloResponse, err := g.helloGRPCClient.SayHello(ctx, &client.HelloRequest{Name: userName})
178178
if err != nil {

examples/grpc/grpc-streaming-client/main.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type StreamResponse struct {
4343
}
4444

4545
// ServerStreamHandler handles server-side streaming with detailed response tracking
46-
func (c *ChatHandler) ServerStreamHandler(ctx *gofr.Context) (interface{}, error) {
46+
func (c *ChatHandler) ServerStreamHandler(ctx *gofr.Context) (any, error) {
4747
startTime := time.Now()
4848
var responses []StreamResponse
4949

@@ -80,7 +80,7 @@ func (c *ChatHandler) ServerStreamHandler(ctx *gofr.Context) (interface{}, error
8080
}
8181

8282
// Return detailed stream information
83-
return map[string]interface{}{
83+
return map[string]any{
8484
"status": "server stream completed",
8585
"start_time": startTime,
8686
"end_time": time.Now(),
@@ -90,7 +90,7 @@ func (c *ChatHandler) ServerStreamHandler(ctx *gofr.Context) (interface{}, error
9090
}
9191

9292
// ClientStreamHandler handles client-side streaming with detailed tracking
93-
func (c *ChatHandler) ClientStreamHandler(ctx *gofr.Context) (interface{}, error) {
93+
func (c *ChatHandler) ClientStreamHandler(ctx *gofr.Context) (any, error) {
9494
startTime := time.Now()
9595
var streamLog []StreamResponse
9696

@@ -134,7 +134,7 @@ func (c *ChatHandler) ClientStreamHandler(ctx *gofr.Context) (interface{}, error
134134
Direction: "received",
135135
})
136136

137-
return map[string]interface{}{
137+
return map[string]any{
138138
"final_response": response.Message,
139139
"start_time": startTime,
140140
"end_time": time.Now(),
@@ -144,7 +144,7 @@ func (c *ChatHandler) ClientStreamHandler(ctx *gofr.Context) (interface{}, error
144144
}
145145

146146
// BiDiStreamHandler handles bidirectional streaming with detailed tracking
147-
func (c *ChatHandler) BiDiStreamHandler(ctx *gofr.Context) (interface{}, error) {
147+
func (c *ChatHandler) BiDiStreamHandler(ctx *gofr.Context) (any, error) {
148148
startTime := time.Now()
149149
streamLog := make([]StreamResponse, 0)
150150

@@ -170,7 +170,7 @@ func (c *ChatHandler) BiDiStreamHandler(ctx *gofr.Context) (interface{}, error)
170170
return nil, err
171171
}
172172

173-
return map[string]interface{}{
173+
return map[string]any{
174174
"status": "bidirectional stream completed",
175175
"start_time": startTime,
176176
"end_time": time.Now(),

examples/using-add-filestore/go.mod

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toolchain go1.24.1
77
require (
88
github.com/stretchr/testify v1.10.0
99
go.uber.org/mock v0.5.2
10-
gofr.dev v1.42.0
10+
gofr.dev v1.42.2
1111
gofr.dev/pkg/gofr/datasource/file/ftp v0.2.1
1212
)
1313

@@ -19,6 +19,11 @@ require (
1919
cloud.google.com/go/iam v1.5.2 // indirect
2020
cloud.google.com/go/pubsub v1.49.0 // indirect
2121
filippo.io/edwards25519 v1.1.0 // indirect
22+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0 // indirect
23+
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect
24+
github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs v1.2.3 // indirect
25+
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.5.0 // indirect
26+
github.com/Azure/go-amqp v1.3.0 // indirect
2227
github.com/DATA-DOG/go-sqlmock v1.5.2 // indirect
2328
github.com/XSAM/otelsql v0.39.0 // indirect
2429
github.com/beorn7/perks v1.0.1 // indirect
@@ -30,7 +35,7 @@ require (
3035
github.com/dustin/go-humanize v1.0.1 // indirect
3136
github.com/eclipse/paho.mqtt.golang v1.5.0 // indirect
3237
github.com/felixge/httpsnoop v1.0.4 // indirect
33-
github.com/go-logr/logr v1.4.2 // indirect
38+
github.com/go-logr/logr v1.4.3 // indirect
3439
github.com/go-logr/stdr v1.2.2 // indirect
3540
github.com/go-sql-driver/mysql v1.9.3 // indirect
3641
github.com/gogo/protobuf v1.3.2 // indirect
@@ -42,7 +47,7 @@ require (
4247
github.com/gorilla/mux v1.8.1 // indirect
4348
github.com/gorilla/websocket v1.5.3 // indirect
4449
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
45-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
50+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect
4651
github.com/hashicorp/errwrap v1.1.0 // indirect
4752
github.com/hashicorp/go-multierror v1.1.1 // indirect
4853
github.com/jlaffaye/ftp v0.2.0 // indirect
@@ -72,17 +77,18 @@ require (
7277
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
7378
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect
7479
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.61.0 // indirect
75-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
76-
go.opentelemetry.io/otel v1.36.0 // indirect
77-
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 // indirect
78-
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.36.0 // indirect
80+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 // indirect
81+
go.opentelemetry.io/otel v1.37.0 // indirect
82+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 // indirect
83+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0 // indirect
7984
go.opentelemetry.io/otel/exporters/prometheus v0.58.0 // indirect
8085
go.opentelemetry.io/otel/exporters/zipkin v1.36.0 // indirect
81-
go.opentelemetry.io/otel/metric v1.36.0 // indirect
82-
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
83-
go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect
84-
go.opentelemetry.io/otel/trace v1.36.0 // indirect
85-
go.opentelemetry.io/proto/otlp v1.6.0 // indirect
86+
go.opentelemetry.io/otel/metric v1.37.0 // indirect
87+
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
88+
go.opentelemetry.io/otel/sdk/metric v1.37.0 // indirect
89+
go.opentelemetry.io/otel/trace v1.37.0 // indirect
90+
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
91+
gofr.dev/pkg/gofr/datasource/pubsub/eventhub v0.4.0 // indirect
8692
golang.org/x/crypto v0.39.0 // indirect
8793
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect
8894
golang.org/x/net v0.41.0 // indirect
@@ -92,9 +98,9 @@ require (
9298
golang.org/x/term v0.32.0 // indirect
9399
golang.org/x/text v0.26.0 // indirect
94100
golang.org/x/time v0.12.0 // indirect
95-
google.golang.org/api v0.237.0 // indirect
101+
google.golang.org/api v0.238.0 // indirect
96102
google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 // indirect
97-
google.golang.org/genproto/googleapis/api v0.0.0-20250519155744-55703ea1f237 // indirect
103+
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 // indirect
98104
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
99105
google.golang.org/grpc v1.73.0 // indirect
100106
google.golang.org/protobuf v1.36.6 // indirect

0 commit comments

Comments
 (0)