format service and add test (#197)

Co-authored-by: kim <xutao@xiaoheiban.cn>
This commit is contained in:
kingxt
2020-11-09 17:41:07 +08:00
committed by GitHub
parent afbd565d87
commit 3f389a55c2
5 changed files with 75 additions and 104 deletions

View File

@@ -75,3 +75,9 @@ func ComponentName(api *spec.ApiSpec) string {
}
return name + "Components"
}
func WriteIndent(writer io.Writer, indent int) {
for i := 0; i < indent; i++ {
fmt.Fprint(writer, "\t")
}
}