aboutsummaryrefslogtreecommitdiff
path: root/utils/errors/errors.go
blob: 015356a455c7e71ce5fc8ce1e35457ccf32ed5db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package errors

import (
	"errors"
	"fmt"
)

func Error(message string, arguments ...any) error {
	if len(arguments) == 0 {
		return errors.New(message)
	}

	return fmt.Errorf(message, arguments...)
}