Skip to content

Commit 7d59a42

Browse files
committed
📝 Update generated comments
1 parent d08b694 commit 7d59a42

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bin/api-to-go.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ function _buildContent(struct, path, url) {
3333
}
3434
let comment = `// ${path.struct} is the go struct of api's payload.`
3535
if (path.path.pathFormat) {
36-
comment += `\n// url ${url.origin}${path.path.pathFormat}`
37-
comment += `\n// example ${url.href}`
36+
comment += `\n//\n// url: ${url.origin}${path.path.pathFormat}`
37+
comment += `\n// example: ${url.href}`
3838
} else {
39-
comment += `\n// url ${url.href}`
39+
comment += `\n//\n// url: ${url.href}`
4040
}
41-
content = `${content}${comment}\n${struct}`
41+
content = `${content}${comment}\n//\n${struct}`
4242
return content
4343
}
4444

0 commit comments

Comments
 (0)