mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-24 13:56:57 +00:00
more linting issues
This commit is contained in:
parent
7c68a59f39
commit
de9c37d72b
2 changed files with 8 additions and 2 deletions
|
@ -61,6 +61,6 @@ func getTestHTTPSClient() *http.Client {
|
|||
|
||||
func getSize(stream io.Reader) int {
|
||||
buf := new(bytes.Buffer)
|
||||
buf.ReadFrom(stream)
|
||||
_, _ = buf.ReadFrom(stream)
|
||||
return buf.Len()
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@ func TestMain(m *testing.M) {
|
|||
time.Sleep(30 * time.Second)
|
||||
|
||||
m.Run()
|
||||
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
func startServer(ctx context.Context) error {
|
||||
|
@ -42,7 +44,11 @@ func startServer(ctx context.Context) error {
|
|||
app.Action = cmd.Serve
|
||||
app.Flags = cmd.ServeFlags
|
||||
|
||||
go app.RunContext(ctx, args)
|
||||
go func() {
|
||||
if err := app.RunContext(ctx, args); err != nil {
|
||||
log.Fatalf("run server error: %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue