summaryrefslogtreecommitdiff
path: root/common/common.go
diff options
context:
space:
mode:
authorhhvn <dev@hhvn.uk>2023-08-14 14:04:41 +0100
committerhhvn <dev@hhvn.uk>2023-08-14 14:47:38 +0100
commit79a80fbbf278e0eb743a79e2c0c252817537434f (patch)
tree7704e968ec2071a931140b43f6ec2ea61ed1d527 /common/common.go
parent0543020038edb5de1162863e7401ea36f8a8584c (diff)
Creating and destroying the windows
Diffstat (limited to 'common/common.go')
-rw-r--r--common/common.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/common/common.go b/common/common.go
index 20c2c0a..00d58ee 100644
--- a/common/common.go
+++ b/common/common.go
@@ -12,11 +12,7 @@ func Perror(function string, err error) error {
func Error(format string, a ... any) (int, error) {
fmt.Fprintf(os.Stderr, "error: ")
- if (len(a) == 0) {
- return fmt.Fprintf(os.Stderr, format)
- } else {
- return fmt.Fprintf(os.Stderr, format, a)
- }
+ return fmt.Fprintf(os.Stderr, format, a...)
}
func Intify(s string) (int, error) {