Documentation
¶
Index ¶
Constants ¶
View Source
const ( // slog does not define trace and fatal levels, so we define them here. LevelTrace = slog.LevelDebug - 4 LevelDebug = slog.LevelDebug LevelInfo = slog.LevelInfo LevelWarn = slog.LevelWarn LevelError = slog.LevelError LevelFatal = slog.LevelError + 4 LevelPanic = slog.LevelError + 8 Disable = slog.LevelInfo + 1000 // A level that disables logging, used for testing or no-op logger. )
Variables ¶
This section is empty.
Functions ¶
func FormatLogLevel ¶
func NoOpLogger ¶
NoOpLogger returns a no-op logger that does not log anything.
Types ¶
type FileWatcher ¶
type FileWatcher struct {
// contains filtered or unexported fields
}
FileWatcher watches a file for changes and calls a callback function when the file is modified.
func NewFileWatcher ¶
func NewFileWatcher(path string, callback func()) *FileWatcher
NewFileWatcher creates a new file watcher for the given path and callback function.
func (*FileWatcher) Close ¶
func (fw *FileWatcher) Close() error
func (*FileWatcher) Start ¶
func (fw *FileWatcher) Start() error
Click to show internal directories.
Click to hide internal directories.