mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 05:40:11 +01:00
Fixed linting errors
This commit is contained in:
parent
e658738b56
commit
fb1cf32e17
2 changed files with 4 additions and 3 deletions
|
|
@ -149,8 +149,9 @@ func ErrorCheck(err error) {
|
|||
}
|
||||
}
|
||||
|
||||
// ErrorCheck checks if err is not nil and terminates
|
||||
// the program if so.
|
||||
// ErrorCheckStructured checks if err is not nil and terminates the program if
|
||||
// so. This is similar to [ErrorCheck], but uses [slog] instead of the
|
||||
// non-structured Go logging.
|
||||
func ErrorCheckStructured(err error) {
|
||||
if err != nil {
|
||||
slog.Error("Error while executing program", "err", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue