Skip to content

Commit

Permalink
Run formatter on files
Browse files Browse the repository at this point in the history
  • Loading branch information
patapancakes committed May 10, 2024
1 parent a8502fc commit 6936631
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ func uuidFromRequest(r *http.Request) ([]byte, error) {
func httpError(w http.ResponseWriter, r *http.Request, err error, code int) {
log.Printf("%s: %s\n", r.URL.Path, err)
http.Error(w, err.Error(), code)
}
}
4 changes: 2 additions & 2 deletions db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ func Init(username, password, protocol, address, database string) error {
if err != nil {
return fmt.Errorf("failed to open database connection: %s", err)
}

conns := 1024
if protocol != "unix" {
conns = 256
}

handle.SetMaxOpenConns(conns)
handle.SetMaxIdleConns(conns/4)
handle.SetMaxIdleConns(conns / 4)

handle.SetConnMaxIdleTime(time.Second * 10)

Expand Down
3 changes: 1 addition & 2 deletions rogueserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func main() {
dbname := flag.String("dbname", "pokeroguedb", "database name")

tlscert := flag.String("tlscert", "", "tls certificate path")
tlskey := flag.String("tlskey", "", "tls key path")
tlskey := flag.String("tlskey", "", "tls key path")

flag.Parse()

Expand Down Expand Up @@ -130,4 +130,3 @@ func debugHandler(router *http.ServeMux) http.Handler {
router.ServeHTTP(w, r)
})
}

0 comments on commit 6936631

Please sign in to comment.