diff options
| author | Bobby <[email protected]> | 2026-03-06 22:15:09 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2026-03-06 22:15:09 +0530 |
| commit | 3f07a4b6c745707f135a7a97e93b0fa770b67873 (patch) | |
| tree | 2a16507183d139da1338a61fc4f222d094fff138 /utils/errors/errors.go | |
| parent | 7e32d634cd488b0f100b62ad29234951dc6fb6e3 (diff) | |
| download | dove-3f07a4b6c745707f135a7a97e93b0fa770b67873.tar.xz dove-3f07a4b6c745707f135a7a97e93b0fa770b67873.zip | |
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
Diffstat (limited to 'utils/errors/errors.go')
| -rw-r--r-- | utils/errors/errors.go | 14 |
1 files changed, 14 insertions, 0 deletions
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...) +} |
