// 文件: database/database.goifdialect=="sqlite3"{// We use the database connection inside the handlers from the http// framework, therefore concurrent access occurs. Sqlite cannot handle// concurrent writes, so we limit sqlite to one connection.// see https://github.com/mattn/go-sqlite3/issues/274db.DB().SetMaxOpenConns(1)}ifdialect=="mysql"{// Mysql has a setting called wait_timeout, which defines the duration// after which a connection may not be used anymore.// The default for this setting on mariadb is 10 minutes.// See https://github.com/docker-library/mariadb/issues/113db.DB().SetConnMaxLifetime(9*time.Minute)}