fix-log-fatal

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

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

Loading…
Cancel
Save