Skip to content

Commit 9dbc127

Browse files
committed
removed ydb.MustParamsFromMap + fixed linter issues
1 parent c539324 commit 9dbc127

File tree

4 files changed

+12
-22
lines changed

4 files changed

+12
-22
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
* Marked as deprecated `ydb.MustParamsFromMap`
1+
* Removed experimental helper `ydb.MustParamsFromMap`
22
* Changed result of experimental helper `ydb.ParamsFromMap` from tuple <`params.Parameters`, `error`> to `params.Parameters` only
33

44
## v3.93.1

example_test.go

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,7 @@ func ExampleOpen_advanced() {
511511
fmt.Printf("connected to %s, database '%s'", db.Endpoint(), db.Name())
512512
}
513513

514-
// func ExampleParamsMap
515-
func ExampleMustParamsFromMap() {
514+
func ExampleParamsFromMap() {
516515
ctx := context.TODO()
517516
db, err := ydb.Open(
518517
ctx,
@@ -532,14 +531,16 @@ func ExampleMustParamsFromMap() {
532531
fmt.Printf("connected to %s, database '%s'", db.Endpoint(), db.Name())
533532

534533
res, err := db.Query().QueryRow(ctx, `
535-
DECLARE $textArg AS Text;
536-
DECLARE $intArg AS Int64;
537-
538-
SELECT $textArg AS TextField, $intArg AS IntField
539-
`, query.WithParameters(ydb.ParamsFromMap(map[string]any{
540-
"$textArg": "asd",
541-
"$intArg": int64(123),
542-
})))
534+
DECLARE $textArg AS Text;
535+
DECLARE $intArg AS Int64;
536+
537+
SELECT $textArg AS TextField, $intArg AS IntField
538+
`,
539+
query.WithParameters(ydb.ParamsFromMap(map[string]any{
540+
"$textArg": "asd",
541+
"$intArg": int64(123),
542+
})),
543+
)
543544
if err != nil {
544545
fmt.Printf("query failed")
545546
}

params_map.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,6 @@ import (
1111
"github.com/ydb-platform/ydb-go-sdk/v3/internal/xerrors"
1212
)
1313

14-
// MustParamsFromMap build parameters from named map, panic if error
15-
//
16-
// Deprecated: use explicitly ParamsFromMap
17-
// Will be removed after June 2025.
18-
// Read about versioning policy: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#deprecated
19-
func MustParamsFromMap(m map[string]any) params.Parameters {
20-
return ParamsFromMap(m)
21-
}
22-
2314
type wrongParameters struct {
2415
err error
2516
}

topic/topictypes/topictypes_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ func TestTopicDescriptionFromRaw(t *testing.T) {
152152
}
153153

154154
for _, v := range testData {
155-
v := v
156155
t.Run(
157156
v.testName, func(t *testing.T) {
158157
d := TopicDescription{}
@@ -322,7 +321,6 @@ func TestTopicConsumerDescriptionFromRaw(t *testing.T) {
322321
},
323322
}
324323
for _, v := range testData {
325-
v := v
326324
t.Run(
327325
v.testName, func(t *testing.T) {
328326
d := TopicConsumerDescription{}

0 commit comments

Comments
 (0)