Skip to content

Commit

Permalink
Remove unnecessary check (#1073)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmmsantos committed Dec 10, 2021
1 parent 75e9d01 commit 00a256c
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions format/format.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package format

import (
"fmt"
"log"
"os"

"github.com/swaggo/swag"
)
Expand All @@ -26,10 +24,6 @@ type Config struct {
}

func (f *Fmt) Build(config *Config) error {
if _, err := os.Stat(config.SearchDir); os.IsNotExist(err) {
return fmt.Errorf("dir: %s is not exist", config.SearchDir)
}

log.Println("Formating code.... ")
formater := swag.NewFormater()
if err := formater.FormatAPI(config.SearchDir, config.Excludes, config.MainFile); err != nil {
Expand Down

0 comments on commit 00a256c

Please sign in to comment.