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