mirror of
https://git.sr.ht/~ashkeel/strimertul
synced 2024-09-18 01:50:50 +00:00
fix: remove workaround for Go 1.18 and previous
This commit is contained in:
parent
44333fc392
commit
7ba233dda4
2 changed files with 1 additions and 9 deletions
|
@ -16,7 +16,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Fixed `game` command not working when the specified channel contained the @ symbol at the beginning.
|
||||
- Fixed strimertul crashing at start if the database folder didn't exist and a database driver was not manually specified
|
||||
- Fixed strimertul crashing after a minute of being open if Twitch was not configured.
|
||||
- Hotfix for MIME bug in Windows (`.js` files erraneously being interpreted as `text/plain`). This is fixed will be Go 1.19, but is still provided for Go 1.18 builds.
|
||||
|
||||
## [2.1.1] - 2022-03-24
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"mime"
|
||||
"net/http"
|
||||
"net/http/pprof"
|
||||
|
||||
|
@ -43,19 +42,13 @@ func NewServer(manager *modules.Manager) (*Server, error) {
|
|||
|
||||
logger := manager.Logger(modules.ModuleHTTP)
|
||||
|
||||
// Fix mime type bug in Windows (fixed in Go 1.19)
|
||||
err := mime.AddExtensionType(".js", "text/javascript; charset=utf-8")
|
||||
if err != nil {
|
||||
logger.Warn("Failed to set fix for mime-type bug", zap.Error(err))
|
||||
}
|
||||
|
||||
server := &Server{
|
||||
logger: logger,
|
||||
db: db,
|
||||
server: &http.Server{},
|
||||
manager: manager,
|
||||
}
|
||||
err = db.GetJSON(ServerConfigKey, &server.Config)
|
||||
err := db.GetJSON(ServerConfigKey, &server.Config)
|
||||
if err != nil {
|
||||
// Initialize with default config
|
||||
server.Config = ServerConfig{
|
||||
|
|
Loading…
Reference in a new issue