Files
Курнат Андрей 2315f25754 Initial QSfera import
2026-06-07 10:20:04 +03:00

31 lines
491 B
Go

package configlog
import (
"fmt"
"os"
)
// Error logs the error
func Error(err error) {
if err != nil {
fmt.Printf("%v\n", err)
}
}
// ReturnError logs the error and returns it unchanged
func ReturnError(err error) error {
if err != nil {
fmt.Printf("%v\n", err)
}
return err
}
// ReturnFatal logs the error and calls os.Exit(1) and returns nil if no error is passed
func ReturnFatal(err error) error {
if err != nil {
fmt.Printf("%v\n", err)
os.Exit(1)
}
return nil
}