Files
Win2Linux/pkg/errors/errors.go
2026-04-19 12:56:16 +02:00

26 lines
326 B
Go

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
}