go-html/deps/go-log/log.go
Virgil 739f1f52fc
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
feat(html): add accessibility helpers
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 16:26:46 +00:00

20 lines
470 B
Go

package log
import (
"errors"
"fmt"
)
// E wraps an error with scope and message.
func E(scope, message string, err error) error {
if err == nil {
return errors.New(scope + ": " + message)
}
return fmt.Errorf("%s: %s: %w", scope, message, err)
}
// Error writes an error-level message. This stub is a no-op for tests.
func Error(msg string, _ ...any) {}
// Info writes an info-level message. This stub is a no-op for tests.
func Info(msg string, _ ...any) {}