func main() { input := conform.Input{ Arguments: os.Args[1:], Environment: os.Environ(), } output, err := conform.Run(input) if err != nil { fmt.Println(err) } else { fmt.Println(output) } }
func TestSingleValueJson(t *testing.T) { env := mockSingleValue() input := conform.Input{ Arguments: []string{ "-p", "PREFIX_", "-f", "json", }, Environment: env.envVars, } output, err := conform.Run(input) if err != nil { t.Fatal(err.Error()) } if output != env.jsonOutput { t.Fatalf("Expected %v, instead got %v", env.jsonOutput, output) } }