aboutsummaryrefslogtreecommitdiff
path: root/internal/util/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/util/util.go')
-rw-r--r--internal/util/util.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/util/util.go b/internal/util/util.go
new file mode 100644
index 0000000..54a0805
--- /dev/null
+++ b/internal/util/util.go
@@ -0,0 +1,17 @@
+package util
+
+import (
+ "log"
+ "os"
+)
+
+var errorLogger = log.New(os.Stderr, "ERROR ", log.LstdFlags|log.Lmsgprefix)
+
+func Error(v ...interface{}) {
+ errorLogger.Print(v...)
+}
+
+//noinspection GoUnusedExportedFunction
+func Errorf(format string, a ...interface{}) {
+ errorLogger.Printf(format, a...)
+}