Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{ | |
AddSource: false, | |
Level: slog.LevelDebug, | |
})) | |
slog.SetDefault(logger) | |
watcher, err := watcher.New(logger) | |
defer watcher.Shutdown() | |
err = watcher.Watch("/home/user", func(e watcher.Event) error { |