From 2e3b351c355bd241de4aa4f2bdafd633ccef6eac Mon Sep 17 00:00:00 2001 From: hhvn Date: Fri, 4 Aug 2023 23:02:50 +0100 Subject: Implement bspc wrappers --- common/common.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 common/common.go (limited to 'common/common.go') diff --git a/common/common.go b/common/common.go new file mode 100644 index 0000000..00ac8e6 --- /dev/null +++ b/common/common.go @@ -0,0 +1,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) +} -- cgit v1.2.3