diff options
author | Thomas Voss <mail@thomasvoss.com> | 2025-06-14 00:45:04 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2025-06-14 00:45:04 +0200 |
commit | fe2bae01c6b14eef0e61cd4a6bd50e814de4bb58 (patch) | |
tree | 60fbda65d5fa3a9afc966bce51b6968e966baf4c /src/try | |
parent | 2d5ca3a6cd507ef29eb13b3a78232264a2817e81 (diff) |
Move some packages to pkg/
Diffstat (limited to 'src/try')
-rw-r--r-- | src/try/try.go | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/try/try.go b/src/try/try.go deleted file mode 100644 index d2ea27e..0000000 --- a/src/try/try.go +++ /dev/null @@ -1,19 +0,0 @@ -package try - -import ( - "log" - - "git.thomasvoss.com/euro-cash.eu/src/atexit" -) - -func Try(e error) { - if e != nil { - atexit.Exec() - log.Fatalln(e) - } -} - -func Try2[T any](x T, e error) T { - Try(e) - return x -} |