wip: using pflag and viper; remove go routine for exec file search

This commit is contained in:
2024-03-21 11:26:11 +11:00
parent a1d0360d46
commit 6032b6c0c1
9 changed files with 100 additions and 606 deletions

View File

@@ -0,0 +1,23 @@
package main
import (
"os"
"testing"
)
func TestEntry_configPathEnv(t *testing.T) {
_ = os.Setenv("WINGMATE_CONFIG_PATH", "/Volumes/Source/go/src/gitea.suyono.dev/suyono/wingmate/docker/bookworm/etc/wingmate")
defer func() {
_ = os.Unsetenv("WINGMATE_CONFIG_PATH")
}()
main()
}
func TestEntry_configPathPFlag(t *testing.T) {
os.Args = []string{"wingmate", "--config", "/Volumes/Source/go/src/gitea.suyono.dev/suyono/wingmate/docker/bookworm/etc/wingmate"}
main()
}
func TestEntry(t *testing.T) {
main()
}