fix for test
This commit is contained in:
parent
b65488f243
commit
dfae734cba
3 changed files with 4 additions and 5 deletions
2
go.mod
2
go.mod
|
|
@ -96,5 +96,5 @@ require (
|
|||
golang.org/x/crypto v0.49.0
|
||||
golang.org/x/net v0.52.0
|
||||
golang.org/x/sync v0.20.0 // indirect
|
||||
golang.org/x/sys v0.42.0 // indirect
|
||||
golang.org/x/sys v0.42.0
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package logger
|
||||
|
||||
|
|
@ -7,6 +6,8 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func initPanicFile(panicFile string) io.WriteCloser {
|
||||
|
|
@ -14,7 +15,7 @@ func initPanicFile(panicFile string) io.WriteCloser {
|
|||
if err != nil {
|
||||
panic(fmt.Sprintf("error in open panic: %v", err))
|
||||
}
|
||||
if err = Dup2(int(file.Fd()), int(os.Stderr.Fd())); err != nil {
|
||||
if err = unix.Dup2(int(file.Fd()), int(os.Stderr.Fd())); err != nil {
|
||||
panic(fmt.Sprintf("error in syscall.Dup2: %v", err))
|
||||
}
|
||||
return file
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
//go:build linux && (arm64 || arm64be || arm || armbe)
|
||||
// +build linux
|
||||
// +build arm64 arm64be arm armbe
|
||||
|
||||
package logger
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue