Commit 887c5cf
committed
refactor: remove dependency on golang.org/x/exp
The exp module does not have the same compatibility guarantees as the
standard library. The fact that it stays on a pseudo-version instead of
a proper semver tag, and the possibility for backwards-incompatible
changes, makes depending on exp in a widely-imported library a bit
risky. If a dependent of the SDK updated the version of exp they relied
on, the MVS algorithm could select a version that broke the SDK's usage
of exp's packages.
Out of an abundance of caution, I'm trying to reduce the use of exp in
our private shared libraries for this reason, and the OpenFeature SDK is
our only external dependency that depends on it it. The uses are pretty
small. I've replaced them with existing standard library functiosn where
possible, or in one place implemented the functionality myself, since
`maps.Values` is only available in the standard library from go 1.23.
While in the area, I've also updated a couple of functions that are
already replaceable with functions from the standard slices package.
Signed-off-by: Eli Treuherz <et@arenko.group>1 parent c2eb5af commit 887c5cf
File tree
5 files changed
+20
-48
lines changed- openfeature
5 files changed
+20
-48
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
| |||
53 | 51 | | |
54 | 52 | | |
55 | 53 | | |
56 | | - | |
57 | | - | |
58 | 54 | | |
59 | 55 | | |
60 | 56 | | |
| |||
69 | 65 | | |
70 | 66 | | |
71 | 67 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | 68 | | |
79 | 69 | | |
80 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
| |||
260 | 258 | | |
261 | 259 | | |
262 | 260 | | |
263 | | - | |
| 261 | + | |
264 | 262 | | |
265 | 263 | | |
266 | 264 | | |
| |||
360 | 358 | | |
361 | 359 | | |
362 | 360 | | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
369 | 366 | | |
370 | | - | |
| 367 | + | |
371 | 368 | | |
372 | 369 | | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
378 | 374 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
385 | 379 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | | - | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | | - | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | 281 | | |
292 | 282 | | |
293 | 283 | | |
| |||
0 commit comments