File tree 4 files changed +12
-6
lines changed
4 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 11
11
- macOS
12
12
- Windows
13
13
go-version :
14
- - ' 1.20'
15
14
- ' 1.21'
16
15
- ' 1.22'
16
+ - ' 1.23'
17
17
include :
18
18
- platform : Linux
19
19
os : ubuntu-latest
Original file line number Diff line number Diff line change 1
1
module github.com/hattya/go.sh
2
2
3
- go 1.20
3
+ go 1.21
Original file line number Diff line number Diff line change 1
1
//
2
2
// go.sh/interp :: lexer.go
3
3
//
4
- // Copyright (c) 2021 Akinori Hattori <[email protected] >
4
+ // Copyright (c) 2021-2024 Akinori Hattori <[email protected] >
5
5
//
6
6
// SPDX-License-Identifier: MIT
7
7
//
@@ -13,6 +13,7 @@ package interp
13
13
import (
14
14
"fmt"
15
15
"io"
16
+ "runtime"
16
17
"strings"
17
18
"sync"
18
19
"unicode"
@@ -98,7 +99,9 @@ func (l *lexer) run() {
98
99
defer func () {
99
100
close (l .token )
100
101
101
- if e := recover (); e != nil {
102
+ switch e := recover ().(type ) {
103
+ case nil , * runtime.PanicNilError :
104
+ default :
102
105
// re-panic
103
106
panic (e )
104
107
}
Original file line number Diff line number Diff line change 1
1
//
2
2
// go.sh/parser :: lexer.go
3
3
//
4
- // Copyright (c) 2018-2021 Akinori Hattori <[email protected] >
4
+ // Copyright (c) 2018-2024 Akinori Hattori <[email protected] >
5
5
//
6
6
// SPDX-License-Identifier: MIT
7
7
//
@@ -16,6 +16,7 @@ import (
16
16
"errors"
17
17
"fmt"
18
18
"io"
19
+ "runtime"
19
20
"strings"
20
21
"sync"
21
22
"sync/atomic"
@@ -136,7 +137,9 @@ func (l *lexer) run() {
136
137
close (l .done )
137
138
}
138
139
139
- if e := recover (); e != nil {
140
+ switch e := recover ().(type ) {
141
+ case nil , * runtime.PanicNilError :
142
+ default :
140
143
// re-panic
141
144
panic (e )
142
145
}
You can’t perform that action at this time.
0 commit comments