diff options
| author | hhvn <dev@hhvn.uk> | 2023-08-04 23:02:50 +0100 |
|---|---|---|
| committer | hhvn <dev@hhvn.uk> | 2023-08-04 23:02:50 +0100 |
| commit | 2e3b351c355bd241de4aa4f2bdafd633ccef6eac (patch) | |
| tree | d8539a86e412edde0f53fc6813111a38e2d9f03a /common | |
Implement bspc wrappers
Diffstat (limited to 'common')
| -rw-r--r-- | common/common.go | 14 |
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) +} |