mirror of
https://github.com/opbnq-q/nto-cli.git
synced 2025-12-06 18:10:35 +07:00
feat: autoformatter
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
"nto_cli/entities"
|
||||
"nto_cli/utils"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@@ -63,6 +64,7 @@ func GenerateScheme(structName string, fields []entities.Field, mkPath string) {
|
||||
log.Fatalf("Failed to execute template: %s", err)
|
||||
}
|
||||
log.Printf("Scheme for `%s` model is written: %s", structName, schemeFilePath)
|
||||
_ = utils.FormatFilesWithPrettier([]string{schemeFilePath})
|
||||
}
|
||||
|
||||
func processDependencies(fields []entities.Field) []Dependency {
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
_ "embed"
|
||||
"fmt"
|
||||
"log"
|
||||
"nto_cli/utils"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@@ -50,4 +51,5 @@ func GenerateService(structName, mkPath string) {
|
||||
log.Fatalf("Failed to execute template: %s", err)
|
||||
}
|
||||
log.Printf("Service for `%s` model is written: %s", structName, servicePath)
|
||||
_ = utils.FormatFilesWithPrettier([]string{servicePath})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user