lint
This commit is contained in:
parent
dfda110f56
commit
5678759cef
|
@ -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"`
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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"`
|
||||
|
|
Loading…
Reference in New Issue