summaryrefslogtreecommitdiff
path: root/common/common.go
diff options
context:
space:
mode:
authorhhvn <dev@hhvn.uk>2023-08-04 23:02:50 +0100
committerhhvn <dev@hhvn.uk>2023-08-04 23:02:50 +0100
commit2e3b351c355bd241de4aa4f2bdafd633ccef6eac (patch)
treed8539a86e412edde0f53fc6813111a38e2d9f03a /common/common.go
Implement bspc wrappers
Diffstat (limited to 'common/common.go')
-rw-r--r--common/common.go14
1 files changed, 14 insertions, 0 deletions
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)
+}