aceberg/ExerciseDiary

View on GitHub
internal/check/error.go

Summary

Maintainability
A
0 mins
Test Coverage
package check

import (
    "log"
)

// IfError prints error, if it is not nil
func IfError(err error) bool {
    if err == nil {
        return false
    }

    log.Println("ERROR:", err)
    return true
}