fix for ci/cd

This commit is contained in:
Cytown committed 2026-03-23 18:15:16 +08:00
1 parent 4e3769e989
commit d77375721a
6 files changed
+4 -51

No files matched your search

+1 -1
View File
@@ -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
)
+3 -2
View File
@@ -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
-12
View File
@@ -1,12 +0,0 @@
//go:build linux && amd64
// +build linux,amd64
package logger
import (
"syscall"
)
func Dup2(oldfd int, newfd int) error {
return syscall.Dup2(oldfd, newfd)
}
-12
View File
@@ -1,12 +0,0 @@
//go:build linux && arm64
// +build linux,arm64
package logger
import (
"syscall"
)
func Dup2(oldfd int, newfd int) error {
return syscall.Dup3(oldfd, newfd, 0)
}
-12
View File
@@ -1,12 +0,0 @@
//go:build darwin
// +build darwin
package logger
import (
"syscall"
)
func Dup2(oldfd int, newfd int) error {
return syscall.Dup2(oldfd, newfd)
}
-12
View File
@@ -1,12 +0,0 @@
//go:build linux && loong64
// +build linux,loong64
package logger
import (
"syscall"
)
func Dup2(oldfd int, newfd int) error {
return syscall.Dup3(oldfd, newfd, 0)
}