Skip to content

Commit 6a2e0d4

Browse files
committed
minor updates
1 parent 244ab64 commit 6a2e0d4

File tree

1 file changed

+9
-27
lines changed

1 file changed

+9
-27
lines changed

x/mongo/driver/xoptions/options.go

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ import (
1515
)
1616

1717
// SetInternalClientOptions sets internal options for ClientOptions.
18-
//
19-
// Deprecated: This function is for internal use only. It may be changed or removed in any release.
2018
func SetInternalClientOptions(opts *options.ClientOptions, key string, option any) error {
2119
typeErrFunc := func(t string) error {
22-
return fmt.Errorf("unexpected type for %s: %T is not %s", key, option, t)
20+
return fmt.Errorf("unexpected type for %q: %T is not %s", key, option, t)
2321
}
2422
switch key {
2523
case "crypt":
@@ -47,11 +45,9 @@ func SetInternalClientOptions(opts *options.ClientOptions, key string, option an
4745
}
4846

4947
// SetInternalAggregateOptions sets internal options for AggregateOptions.
50-
//
51-
// Deprecated: This function is for internal use only. It may be changed or removed in any release.
5248
func SetInternalAggregateOptions(a *options.AggregateOptionsBuilder, key string, option any) error {
5349
typeErrFunc := func(t string) error {
54-
return fmt.Errorf("unexpected type for %s: %T is not %s", key, option, t)
50+
return fmt.Errorf("unexpected type for %q: %T is not %s", key, option, t)
5551
}
5652
switch key {
5753
case "rawData":
@@ -70,11 +66,9 @@ func SetInternalAggregateOptions(a *options.AggregateOptionsBuilder, key string,
7066
}
7167

7268
// SetInternalCountOptions sets internal options for CountOptions.
73-
//
74-
// Deprecated: This function is for internal use only. It may be changed or removed in any release.
7569
func SetInternalCountOptions(a *options.CountOptionsBuilder, key string, option any) error {
7670
typeErrFunc := func(t string) error {
77-
return fmt.Errorf("unexpected type for %s: %T is not %s", key, option, t)
71+
return fmt.Errorf("unexpected type for %q: %T is not %s", key, option, t)
7872
}
7973
switch key {
8074
case "rawData":
@@ -93,11 +87,9 @@ func SetInternalCountOptions(a *options.CountOptionsBuilder, key string, option
9387
}
9488

9589
// SetInternalDeleteOneOptions sets internal options for DeleteOneOptions.
96-
//
97-
// Deprecated: This function is for internal use only. It may be changed or removed in any release.
9890
func SetInternalDeleteOneOptions(a *options.DeleteOneOptionsBuilder, key string, option any) error {
9991
typeErrFunc := func(t string) error {
100-
return fmt.Errorf("unexpected type for %s: %T is not %s", key, option, t)
92+
return fmt.Errorf("unexpected type for %q: %T is not %s", key, option, t)
10193
}
10294
switch key {
10395
case "rawData":
@@ -116,11 +108,9 @@ func SetInternalDeleteOneOptions(a *options.DeleteOneOptionsBuilder, key string,
116108
}
117109

118110
// SetInternalDeleteManyOptions sets internal options for DeleteManyOptions.
119-
//
120-
// Deprecated: This function is for internal use only. It may be changed or removed in any release.
121111
func SetInternalDeleteManyOptions(a *options.DeleteManyOptionsBuilder, key string, option any) error {
122112
typeErrFunc := func(t string) error {
123-
return fmt.Errorf("unexpected type for %s: %T is not %s", key, option, t)
113+
return fmt.Errorf("unexpected type for %q: %T is not %s", key, option, t)
124114
}
125115
switch key {
126116
case "rawData":
@@ -139,11 +129,9 @@ func SetInternalDeleteManyOptions(a *options.DeleteManyOptionsBuilder, key strin
139129
}
140130

141131
// SetInternalDistinctOptions sets internal options for DistinctOptions.
142-
//
143-
// Deprecated: This function is for internal use only. It may be changed or removed in any release.
144132
func SetInternalDistinctOptions(a *options.DistinctOptionsBuilder, key string, option any) error {
145133
typeErrFunc := func(t string) error {
146-
return fmt.Errorf("unexpected type for %s: %T is not %s", key, option, t)
134+
return fmt.Errorf("unexpected type for %q: %T is not %s", key, option, t)
147135
}
148136
switch key {
149137
case "rawData":
@@ -162,11 +150,9 @@ func SetInternalDistinctOptions(a *options.DistinctOptionsBuilder, key string, o
162150
}
163151

164152
// SetInternalEstimatedDocumentCountOptions sets internal options for EstimatedDocumentCountOptions.
165-
//
166-
// Deprecated: This function is for internal use only. It may be changed or removed in any release.
167153
func SetInternalEstimatedDocumentCountOptions(a *options.EstimatedDocumentCountOptionsBuilder, key string, option any) error {
168154
typeErrFunc := func(t string) error {
169-
return fmt.Errorf("unexpected type for %s: %T is not %s", key, option, t)
155+
return fmt.Errorf("unexpected type for %q: %T is not %s", key, option, t)
170156
}
171157
switch key {
172158
case "rawData":
@@ -185,11 +171,9 @@ func SetInternalEstimatedDocumentCountOptions(a *options.EstimatedDocumentCountO
185171
}
186172

187173
// SetInternalInsertManyOptions sets internal options for InsertManyOptions.
188-
//
189-
// Deprecated: This function is for internal use only. It may be changed or removed in any release.
190174
func SetInternalInsertManyOptions(a *options.InsertManyOptionsBuilder, key string, option any) error {
191175
typeErrFunc := func(t string) error {
192-
return fmt.Errorf("unexpected type for %s: %T is not %s", key, option, t)
176+
return fmt.Errorf("unexpected type for %q: %T is not %s", key, option, t)
193177
}
194178
switch key {
195179
case "rawData":
@@ -208,11 +192,9 @@ func SetInternalInsertManyOptions(a *options.InsertManyOptionsBuilder, key strin
208192
}
209193

210194
// SetInternalInsertOneOptions sets internal options for InsertOneOptions.
211-
//
212-
// Deprecated: This function is for internal use only. It may be changed or removed in any release.
213195
func SetInternalInsertOneOptions(a *options.InsertOneOptionsBuilder, key string, option any) error {
214196
typeErrFunc := func(t string) error {
215-
return fmt.Errorf("unexpected type for %s: %T is not %s", key, option, t)
197+
return fmt.Errorf("unexpected type for %q: %T is not %s", key, option, t)
216198
}
217199
switch key {
218200
case "rawData":

0 commit comments

Comments
 (0)