deepsource: empty string test improving

This commit is contained in:
nichtsen 2021-09-07 19:12:19 +08:00
parent 435196300e
commit 9587f6d16c

View File

@ -124,7 +124,7 @@ func (w *fileLogWriter) Init(config string) error {
if err != nil {
return err
}
if len(w.Filename) == 0 {
if w.Filename == "" {
return errors.New("jsonconfig must have filename")
}
w.suffix = filepath.Ext(w.Filename)