use fmt.Println instead of println

master
kevin 4 years ago committed by kingxt
parent f77c73eec1
commit 4f59fd306a

@ -1,6 +1,7 @@
package main
import (
"fmt"
"time"
"github.com/tal-tech/go-zero/core/executors"
@ -8,7 +9,7 @@ import (
func main() {
exeutor := executors.NewBulkExecutor(func(items []interface{}) {
println(len(items))
fmt.Println(len(items))
}, executors.WithBulkTasks(10))
for {
exeutor.Add(1)

@ -44,8 +44,7 @@ func getParentPackage(dir string) (string, error) {
parent := path.Join(gopath, "src")
pos := strings.Index(absDir, parent)
if pos < 0 {
message := fmt.Sprintf("%s not in gomod project path, or not in GOPATH of %s directory", absDir, gopath)
println(message)
fmt.Printf("%s not in gomod project path, or not in GOPATH of %s directory\n", absDir, gopath)
tempPath = filepath.Dir(absDir)
rootPath = absDir[len(tempPath)+1:]
} else {

@ -175,7 +175,7 @@ func formatFile(tmplBytes *bytes.Buffer, file *os.File) {
builder.WriteString(scanner.Text() + "\n")
}
if err := scanner.Err(); err != nil {
println(err)
fmt.Println(err)
}
}
@ -268,10 +268,12 @@ func genType(writer io.Writer, tp spec.Type) error {
return err
}
}
writeBreakline(writer)
writeIndent(writer, 1)
genGetSet(writer, tp, 2)
writeIndent(writer, 1)
fmt.Fprintln(writer, "}")
return nil
}

@ -156,7 +156,7 @@ func paramsForRoute(route spec.Route, prefixForType func(string) string) string
hasBody := hasRequestBody(route)
rt, err := goTypeToTs(route.RequestType.Name, prefixForType)
if err != nil {
println(err.Error())
fmt.Println(err.Error())
return ""
}
if hasParams && hasBody {

Loading…
Cancel
Save