Skip to content

Commit adb37d8

Browse files
committed
Fix code indentation
1 parent d0ce736 commit adb37d8

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

watcher.go

+9-7
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,16 @@ type Event struct {
6969
// String returns a string depending on what type of event occurred and the
7070
// file name associated with the event.
7171
func (e Event) String() string {
72-
if e.FileInfo != nil {
73-
pathType := "FILE"
74-
if e.IsDir() {
75-
pathType = "DIRECTORY"
76-
}
77-
return fmt.Sprintf("%s %q %s [%s]", pathType, e.Name(), e.Op, e.Path)
72+
if e.FileInfo == nil {
73+
return "???"
7874
}
79-
return "???"
75+
76+
pathType := "FILE"
77+
if e.IsDir() {
78+
pathType = "DIRECTORY"
79+
}
80+
return fmt.Sprintf("%s %q %s [%s]", pathType, e.Name(), e.Op, e.Path)
81+
8082
}
8183

8284
// Watcher describes a process that watches files for changes.

0 commit comments

Comments
 (0)