(automatically) format with golines
Alan Pearce alan@alanpearce.eu
Sun, 23 Jun 2024 19:43:31 +0200
2 files changed, 7 insertions(+), 1 deletions(-)
A .dir-locals.el
@@ -0,0 +1,4 @@+;;; Directory Local Variables -*- no-byte-compile: t -*- +;;; For more information see (info "(emacs) Directory Variables") + +((go-ts-mode . ((apheleia-formatter . golines)))))
M internal/server/dev.go → internal/server/dev.go
@@ -80,7 +80,9 @@ log.Info("watcher event", "name", event.Name, "op", event.Op.String()) if event.Has(fsnotify.Create) || event.Has(fsnotify.Rename) { f, err := os.Stat(event.Name) if err != nil { - slog.Error(fmt.Sprintf("error handling %s event: %v", event.Op.String(), err)) + slog.Error( + fmt.Sprintf("error handling %s event: %v", event.Op.String(), err), + ) } else if f.IsDir() { err = watcher.Add(event.Name) if err != nil {