Skip to content

Commit 8fbd4db

Browse files
authored
Merge pull request #138 from CodeLingoBot/rewrite
Fix function comments based on best practices from Effective Go
2 parents 6dc7ec6 + 9e2def0 commit 8fbd4db

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/handlers.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ func CreateSaveHandler(w http.ResponseWriter, r *http.Request) {
199199
}
200200
}
201201

202-
// Returns last lines of the factorio-current.log file
202+
// LogTail returns last lines of the factorio-current.log file
203203
func LogTail(w http.ResponseWriter, r *http.Request) {
204204
var err error
205205
resp := JSONResponse{
@@ -224,7 +224,7 @@ func LogTail(w http.ResponseWriter, r *http.Request) {
224224
}
225225
}
226226

227-
// Return JSON response of config.ini file
227+
// LoadConfig returns JSON response of config.ini file
228228
func LoadConfig(w http.ResponseWriter, r *http.Request) {
229229
var err error
230230
resp := JSONResponse{
@@ -694,7 +694,7 @@ func RemoveUser(w http.ResponseWriter, r *http.Request) {
694694
}
695695
}
696696

697-
// Return JSON response of server-settings.json file
697+
// GetServerSettings returns JSON response of server-settings.json file
698698
func GetServerSettings(w http.ResponseWriter, r *http.Request) {
699699
resp := JSONResponse{
700700
Success: false,

src/mods_handler.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func listInstalledModsHandler(w http.ResponseWriter, r *http.Request) {
6262
}
6363
}
6464

65-
// Returns JSON response with success or error-message
65+
// LoginFactorioModPortal returns JSON response with success or error-message
6666
func LoginFactorioModPortal(w http.ResponseWriter, r *http.Request) {
6767
var err error
6868
resp := JSONResponse{
@@ -147,7 +147,7 @@ func LogoutFactorioModPortalHandler(w http.ResponseWriter, r *http.Request) {
147147
}
148148
}
149149

150-
//Returns JSON response with the found mods
150+
//ModPortalSearchHandler returns JSON response with the found mods
151151
func ModPortalSearchHandler(w http.ResponseWriter, r *http.Request) {
152152
var err error
153153
resp := JSONResponse{
@@ -180,7 +180,7 @@ func ModPortalSearchHandler(w http.ResponseWriter, r *http.Request) {
180180
}
181181
}
182182

183-
//Returns JSON response with the mod details
183+
//ModPortalDetailsHandler returns JSON response with the mod details
184184
func ModPortalDetailsHandler(w http.ResponseWriter, r *http.Request) {
185185
var err error
186186
resp := JSONResponse{
@@ -567,7 +567,7 @@ func DownloadModsHandler(w http.ResponseWriter, r *http.Request) {
567567
writerHeader.Set("Content-Disposition", fmt.Sprintf("attachment; filename=\"%s\"", "all_installed_mods.zip"))
568568
}
569569

570-
//Returns JSON response with the found mods
570+
//LoadModsFromSaveHandler returns JSON response with the found mods
571571
func LoadModsFromSaveHandler(w http.ResponseWriter, r *http.Request) {
572572
var err error
573573
resp := JSONResponse{

0 commit comments

Comments
 (0)