-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
48 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,37 @@ | ||
package system | ||
|
||
const StatusAwaiting = 0x00ff0000 | ||
const ( | ||
StatusAsync = 0x00ff0000 + iota | ||
StatusInvalidArgs | ||
StatusFailed | ||
) | ||
|
||
// type StatusCode uint | ||
|
||
// func (status StatusCode) Error() string { | ||
// switch status { | ||
// case StatusAsync: | ||
// return "awaiting method calls" | ||
// case StatusInvalidArgs: | ||
// return "invalid arguments" | ||
// case StatusFailed: | ||
// return "application failed" | ||
// } | ||
|
||
// return status.Unwrap().Error() | ||
// } | ||
|
||
// func (status StatusCode) Unwrap() error { | ||
// switch status.ExitCode() { | ||
// case sys.ExitCodeContextCanceled: | ||
// return context.Canceled | ||
// case sys.ExitCodeDeadlineExceeded: | ||
// return context.DeadlineExceeded | ||
// } | ||
|
||
// return sys.NewExitError(status.ExitCode()) | ||
// } | ||
|
||
// func (status StatusCode) ExitCode() uint32 { | ||
// return uint32(status) | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters