Skip to content

Commit 03fa868

Browse files
committed
migration README
1 parent b331abb commit 03fa868

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

scripts/README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The err2 package will offer auto-migration scripts until version 1.0.0 is
44
published. That means that you can safely use the package even the API is not
5-
yet 100% staple. We have used that approach for our production code that uses
5+
yet 100% stable. We have used that approach for our production code that uses
66
`err2` and it works very well. Over 100 KLOC Go code has been auto-migrated
77
successfully from type variables (see below) to Go generics API.
88

@@ -13,12 +13,12 @@ functions or make something obsolete.
1313

1414
The version 0.9.40 is a major update because of the performance and API change.
1515
We have managed to eliminate `defer` slowdown. Our benchmarks are 3x faster than
16-
previous version and about equal to those function call stacks (100 level) that
17-
don't use `defer`. We are exactly at the same level of performance with those
18-
functions that use deferred function that accept an argument. Transporting an
19-
argument to deferred function seems to be slower than functions that don't. And
20-
because `try.To` is already as fast as `if err != nil` we reached our goal for
21-
speed!
16+
previous version and about equal to those function call stacks (100 deep-level)
17+
that don't use `defer`. We are exactly at the same level of performance with
18+
those functions that use deferred function that accept an argument. Transporting
19+
an argument to deferred function seems to be slower than functions that don't.
20+
And because `try.To` is already as fast as `if err != nil` we reached our goal
21+
for speed!
2222

2323
Because all of the error handler function signatures are now:
2424
```go
@@ -35,7 +35,8 @@ important but difficult. The `err2` package writes `fatal error: ...` to
3535
3636
You have two (2) options for migration for v0.9.40:
3737
1. [(Semi)-Automatic Migration](#semi-automatic-migration)
38-
1. [Manual migration using (vim/nvim) location lists or similar](manual-migration-with-a-location-list)
38+
1. [Manual migration using (vim/nvim) location lists or
39+
similar](#manual-migration-with-a-location-list)
3940

4041
#### (Semi)-Automatic Migration
4142

scripts/functions.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ check_prerequisites() {
6060
fi
6161

6262
local go_version=$(go mod edit -json | jq -r '."Go"')
63-
if [[ $go_version < 1.19 ]]; then
63+
if [[ $go_version < 1.18 ]]; then
6464
echo "ERROR: Go version number ($go_version) is too low" >&2
65-
echo "Sample: go mod edit -go=1.19 # sets the minimal version" >&2
65+
echo "Sample: go mod edit -go=1.18 # sets the minimal version" >&2
6666
exit 1
6767
fi
6868

0 commit comments

Comments
 (0)