mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 01:52:26 -05: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:
parent
f77005128a
commit
4a3ece0c6c
5 changed files with 54 additions and 19 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue