Fix other

This commit is contained in:
2026-04-19 12:56:16 +02:00
parent 669c5b3011
commit 42effa04a5
7 changed files with 223 additions and 103 deletions

25
pkg/errors/errors.go Normal file
View File

@@ -0,0 +1,25 @@
package errors
import "fmt"
type (
WinError struct {
err string
_code uint32
}
)
func New(err any, exitCode uint32) *WinError {
return &WinError{
err: fmt.Sprintf("%v", err),
_code: exitCode,
}
}
func (e *WinError) Error() string {
return e.err
}
func (e *WinError) ExitCode() uint32 {
return e._code
}