stevenzack %!s(int64=4) %!d(string=hai) anos
pai
achega
5e007c1f9f
Modificáronse 2 ficheiros con 1 adicións e 8 borrados
  1. 0 7
      tools/goctl/api/ktgen/gen.go
  2. 1 1
      tools/goctl/goctl.go

+ 0 - 7
tools/goctl/api/ktgen/gen.go

@@ -7,7 +7,6 @@ import (
 	"text/template"
 
 	"github.com/iancoleman/strcase"
-	"github.com/tal-tech/go-zero/core/logx"
 	"github.com/tal-tech/go-zero/tools/goctl/api/spec"
 )
 
@@ -116,7 +115,6 @@ object Api{
 func genBase(dir, pkg string, api *spec.ApiSpec) error {
 	e := os.MkdirAll(dir, 0755)
 	if e != nil {
-		logx.Error(e)
 		return e
 	}
 	path := filepath.Join(dir, "BaseApi.kt")
@@ -126,19 +124,16 @@ func genBase(dir, pkg string, api *spec.ApiSpec) error {
 
 	file, e := os.OpenFile(path, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644)
 	if e != nil {
-		logx.Error(e)
 		return e
 	}
 	defer file.Close()
 
 	t, e := template.New("n").Parse(apiBaseTemplate)
 	if e != nil {
-		logx.Error(e)
 		return e
 	}
 	e = t.Execute(file, pkg)
 	if e != nil {
-		logx.Error(e)
 		return e
 	}
 	return nil
@@ -150,13 +145,11 @@ func genApi(dir, pkg string, api *spec.ApiSpec) error {
 
 	e := os.MkdirAll(dir, 0755)
 	if e != nil {
-		logx.Error(e)
 		return e
 	}
 
 	file, e := os.OpenFile(path, os.O_WRONLY|os.O_TRUNC|os.O_CREATE, 0644)
 	if e != nil {
-		logx.Error(e)
 		return e
 	}
 	defer file.Close()

+ 1 - 1
tools/goctl/goctl.go

@@ -2,9 +2,9 @@ package main
 
 import (
 	"fmt"
-	"github.com/tal-tech/go-zero/tools/goctl/api/ktgen"
 	"os"
 
+	"github.com/tal-tech/go-zero/tools/goctl/api/ktgen"
 	"github.com/tal-tech/go-zero/core/logx"
 	"github.com/tal-tech/go-zero/tools/goctl/api/apigen"
 	"github.com/tal-tech/go-zero/tools/goctl/api/dartgen"