Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
asoseil committed Apr 1, 2017
1 parent dfda110 commit 5678759
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type Config struct {
Legacy `yaml:"legacy,omitempty" json:"legacy,omitempty"`
}

// Polling configuration
// Legacy configuration
type Legacy struct {
Status bool `yaml:"status" json:"status"`
Interval time.Duration `yaml:"interval" json:"interval"`
Expand Down
10 changes: 6 additions & 4 deletions settings/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@ func (s Settings) Fatal(err error, msg ...interface{}) {
}
}

func (h Settings) Name(name string, path string) string {
// Name return the project name or the path of the working dir
func (s Settings) Name(name string, path string) string {
if name == "" && path == "" {
return h.Wdir()
return s.Wdir()
} else if path != "/" {
return filepath.Base(path)
}
return name
}

func (h Settings) Path(s string) string {
return strings.Replace(filepath.Clean(s), "\\", "/", -1)
// Path cleaner
func (s Settings) Path(path string) string {
return strings.Replace(filepath.Clean(path), "\\", "/", -1)
}
2 changes: 1 addition & 1 deletion watcher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ type Command struct {
Path string `yaml:"path" json:"path"`
}

// File determinates the status of each log files (streams, logs, errors)
// Streams is a collection of names and values for the logs functionality
type Streams struct {
CliOut bool `yaml:"cli_out" json:"cli_out"`
FileOut bool `yaml:"file_out" json:"file_out"`
Expand Down

0 comments on commit 5678759

Please sign in to comment.