Skip to content

Commit e674b46

Browse files
committed
go fix
1 parent 77dbfa8 commit e674b46

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

screw.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,15 +246,15 @@ func Rename(oldpath, newpath string) error {
246246
return nil
247247
}
248248

249-
func stackdebugf(f string, arg ...interface{}) {
249+
func stackdebugf(f string, arg ...any) {
250250
debugfex(true, f, arg...)
251251
}
252252

253-
func debugf(f string, arg ...interface{}) {
253+
func debugf(f string, arg ...any) {
254254
debugfex(false, f, arg...)
255255
}
256256

257-
func debugerr(err error, f string, arg ...interface{}) {
257+
func debugerr(err error, f string, arg ...any) {
258258
if !DEBUG {
259259
return
260260
}
@@ -267,15 +267,15 @@ func debugerr(err error, f string, arg ...interface{}) {
267267
}
268268
}
269269

270-
func debugfex(stack bool, f string, arg ...interface{}) {
270+
func debugfex(stack bool, f string, arg ...any) {
271271
if DEBUG {
272272
line := fmt.Sprintf(f, arg...)
273273
fmt.Printf("\n\n")
274274
fmt.Printf("=============[screw]=============\n")
275275
fmt.Printf("%s\n", line)
276276
if stack {
277-
stackLines := strings.Split(string(debug.Stack()), "\n")
278-
for _, stackLine := range stackLines {
277+
stackLines := strings.SplitSeq(string(debug.Stack()), "\n")
278+
for stackLine := range stackLines {
279279
fmt.Printf(" -> %s\n", stackLine)
280280
}
281281
}

0 commit comments

Comments
 (0)