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

@ -200,8 +200,8 @@ func stepExec(req *ExecutionRequest) bool {
cmd.Wait() cmd.Wait()
//req.logEntry.Stdout = req.logEntry.StdoutBuffer.String() // req.logEntry.Stdout = req.logEntry.StdoutBuffer.String()
//req.logEntry.Stderr = req.logEntry.StderrBuffer.String() // req.logEntry.Stderr = req.logEntry.StderrBuffer.String()
req.logEntry.ExecutionCompleted = true req.logEntry.ExecutionCompleted = true
req.logEntry.ExitCode = int32(cmd.ProcessState.ExitCode()) req.logEntry.ExitCode = int32(cmd.ProcessState.ExitCode())

View File

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

View File

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