mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[bugfix] ensure testrig package only compiled-in when debug enabled (#3185)
* ensure testrig package only compiled-in (including init) when debug enabled * add code comment to testrig init to indicate WebAssembly compilation
This commit is contained in:
@@ -19,6 +19,7 @@ package testrig
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
@@ -34,11 +35,13 @@ func init() {
|
||||
ctx := context.Background()
|
||||
|
||||
// Ensure global ffmpeg WASM pool initialized.
|
||||
fmt.Println("testrig: precompiling ffmpeg WASM")
|
||||
if err := ffmpeg.InitFfmpeg(ctx, 1); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// Ensure global ffmpeg WASM pool initialized.
|
||||
fmt.Println("testrig: precompiling ffprobe WASM")
|
||||
if err := ffmpeg.InitFfprobe(ctx, 1); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user