INNER CODE UNIT · Go

resetFlags

arttor/helmify · cmd/helmify/flags_test.go:23

func resetFlags(t *testing.T) {
	t.Helper()
	flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ContinueOnError)
}

func TestReadFlags_MutuallyExclusive(t *testing.T) {
	oldArgs := os.Args
	oldCommandLine := flag.CommandLine

	t.Cleanup(func() {
		os.Args = oldArgs
		flag.CommandLine = oldCommandLine
	})

	os.Args = []string{
		"helmify",
		"-crd-dir",
		"-optional-crds",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…