fix-log-fatal

master
stevenzack 4 years ago committed by Kevin Wan
parent 701208b6f4
commit 693a8b627a

@ -2,7 +2,6 @@ package ktgen
import ( import (
"fmt" "fmt"
"log"
"os" "os"
"path/filepath" "path/filepath"
"text/template" "text/template"
@ -137,11 +136,7 @@ func genApi(dir, pkg string, api *spec.ApiSpec) error {
t, e := template.New("api").Funcs(funcsMap).Parse(apiTemplate) t, e := template.New("api").Funcs(funcsMap).Parse(apiTemplate)
if e!=nil { if e!=nil {
log.Fatal(e) return e
}
e = t.Execute(file, api)
if e != nil {
log.Fatal(e)
} }
return nil return t.Execute(file, api)
} }

Loading…
Cancel
Save