cmd: allow import/running ctrld as library

This commit is contained in:
Cuong Manh Le
2023-08-15 11:15:37 +00:00
committed by Cuong Manh Le
parent 4896563e3c
commit 829e93c079
34 changed files with 195 additions and 188 deletions
+17
View File
@@ -0,0 +1,17 @@
package cli
import (
"os"
"strings"
"testing"
"github.com/rs/zerolog"
)
var logOutput strings.Builder
func TestMain(m *testing.M) {
l := zerolog.New(&logOutput)
mainLog.Store(&l)
os.Exit(m.Run())
}