Skip to content

Commit 3713fe9

Browse files
committed
📝 Update Comments
1 parent 620c6af commit 3713fe9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/buildContent.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
const {loadYaml} = require("./util");
22

33
function buildContent(struct, path, url, configFile = "./.api-to-go.yml") {
4-
let content = `package ${path.pkg}\n\n`
4+
let content = `// Code generated by api-to-go (https://github.com/nkmr-jp/api-to-go).\n\n`
5+
content += `package ${path.pkg}\n\n`
56
if (struct.indexOf('time.') !== -1) {
6-
content = `${content}import "time"\n\n`
7+
content += `${content}import "time"\n\n`
78
}
89
const comment = _buildComment(path, url, configFile)
9-
content = `${content}${comment}\n//\n${struct}`
10+
content += comment
11+
content += struct
1012
return content
1113
}
1214

@@ -20,7 +22,7 @@ function _buildComment(path, url, configFile) {
2022
if (cfg?.["docs"] !== undefined) {
2123
comment += `\n// Docs: ${cfg?.["docs"]}`
2224
}
23-
return comment
25+
return `${comment}\n//\n`
2426
}
2527

2628

0 commit comments

Comments
 (0)