Skip to content

Commit

Permalink
Fix code indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
radovskyb committed Dec 12, 2018
1 parent d0ce736 commit adb37d8
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,16 @@ type Event struct {
// String returns a string depending on what type of event occurred and the
// file name associated with the event.
func (e Event) String() string {
if e.FileInfo != nil {
pathType := "FILE"
if e.IsDir() {
pathType = "DIRECTORY"
}
return fmt.Sprintf("%s %q %s [%s]", pathType, e.Name(), e.Op, e.Path)
if e.FileInfo == nil {
return "???"
}
return "???"

pathType := "FILE"
if e.IsDir() {
pathType = "DIRECTORY"
}
return fmt.Sprintf("%s %q %s [%s]", pathType, e.Name(), e.Op, e.Path)

}

// Watcher describes a process that watches files for changes.
Expand Down

0 comments on commit adb37d8

Please sign in to comment.