Skip to content

Commit

Permalink
add golangci
Browse files Browse the repository at this point in the history
  • Loading branch information
AKB428 committed May 1, 2022
1 parent abf4e40 commit 6926477
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ mkmf.log
conf/conf.json
anime_master_api
sora_api_go_native
anime_master_api_linux
anime_master_api_linux
.vscode
21 changes: 21 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Options for analysis running.
run:
# See the dedicated "run" documentation section.
option: value
# output configuration options
output:
# See the dedicated "output" documentation section.
option: value
# All available settings of specific linters.
linters-settings:
# See the dedicated "linters-settings" documentation section.
option: value
linters:
# See the dedicated "linters" documentation section.
option: value
issues:
# See the dedicated "issues" documentation section.
option: value
severity:
# See the dedicated "severity" documentation section.
option: value
9 changes: 6 additions & 3 deletions anime_master_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ func gormConnect() *gorm.DB {
}

func main() {
http.ListenAndServe(":8080", nil)
error := http.ListenAndServe(":8080", nil)
if error != nil {
log.Print(error)
}
}

type Base struct {
Expand Down Expand Up @@ -435,8 +438,8 @@ func cacheRefresh(w http.ResponseWriter, r *http.Request) {
cacheBasesWithOgp[cil.Id] = res
}

w.Write([]byte("[OK] Refresh Cache\n"))
w.Write([]byte("[OK] Refresh Cache.\n"))
} else {
w.Write([]byte("[NG] Refresh Cache error\n"))
w.Write([]byte("[NG] ERROR Refresh Cache.\n"))
}
}

0 comments on commit 6926477

Please sign in to comment.