fmt: codestyle formatting

This commit is contained in:
jamesread 2023-08-24 12:11:28 +01:00
parent 07bd09473c
commit 4b5a579b0b
3 changed files with 6 additions and 7 deletions

View File

@ -1,12 +1,12 @@
package httpservers
import (
"time"
"context"
log "github.com/sirupsen/logrus"
"net/http"
"nhooyr.io/websocket"
"nhooyr.io/websocket/wsjson"
"context"
"time"
)
func handleWebsocket(w http.ResponseWriter, r *http.Request) bool {
@ -34,7 +34,6 @@ func handleWebsocket(w http.ResponseWriter, r *http.Request) bool {
return false
}
c.Close(websocket.StatusNormalClosure, "")
return true
}

View File

@ -1,16 +1,16 @@
package httpservers
import (
config "github.com/OliveTin/OliveTin/internal/config"
"github.com/stretchr/testify/assert"
"os"
"testing"
config "github.com/OliveTin/OliveTin/internal/config"
)
func TestGetWebuiDir(t *testing.T) {
os.Chdir("../../") // go test sets the cwd to "httpservers" by default
cfg = config.DefaultConfig();
cfg = config.DefaultConfig()
dir := findWebuiDir()