summaryrefslogtreecommitdiff
path: root/common/common.go
blob: 00ac8e632705e5ea157fd5911bc32f6ab2d0e282 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package common

import (
	"os"
	"fmt"
)

func Perror(function string, err error) error {
	return fmt.Errorf("%s(): %w", function, err)
}

func Error(format string, a ... any) (int, error) {
	return fmt.Fprintf(os.Stderr, format, a)
}