From 3f07a4b6c745707f135a7a97e93b0fa770b67873 Mon Sep 17 00:00:00 2001 From: Bobby Date: Fri, 6 Mar 2026 22:15:09 +0530 Subject: Add configuration and logging modules with TOML support - Implement configuration management in the config package - Define constants and types for server and mailbox configurations - Create functions for loading and parsing configuration files - Introduce logging functionality with customizable log levels and formats - Add error handling and messages for configuration and logging operations - Include TOML utilities for default value application and content marshaling --- utils/errors/errors.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 utils/errors/errors.go (limited to 'utils/errors/errors.go') diff --git a/utils/errors/errors.go b/utils/errors/errors.go new file mode 100644 index 0000000..015356a --- /dev/null +++ b/utils/errors/errors.go @@ -0,0 +1,14 @@ +package errors + +import ( + "errors" + "fmt" +) + +func Error(message string, arguments ...any) error { + if len(arguments) == 0 { + return errors.New(message) + } + + return fmt.Errorf(message, arguments...) +} -- cgit v1.2.3