Files
Majd Alfhaily 95c3aa6629 Refactor API interfaces (#185)
- Move logging to command level.
- Simplify and unify interfaces for `appstore` package.
- Move sinf replication from "Download" API to "ReplicateSinf" API.
- Handle retries and command specific logic in the command level.
- Rename "Info" API to "AccountInfo".
2023-05-27 18:48:22 +02:00

11 lines
218 B
Go

package util
// Must is a helper that wraps a call to a function returning (T, error) and panics if the error is non-nil.
func Must[T any](val T, err error) T {
if err != nil {
panic(err.Error())
}
return val
}