INNER CODE UNIT · Go

main

mweagle/Sparta · aws/step/generator/main.go:72

func main() {
	// Params are the path to the input definitions and the
	// output path.
	if len(os.Args) != 3 {
		fmt.Printf("Please provide path to the source definition as arg1, path to the output file as arg2\n")
		os.Exit(1)
	}
	inputDefFile := os.Args[1]
	outputSourceFile := os.Args[2]
	/* #nosec G304 */
	inputFileBytes, inputFileBytesErr := ioutil.ReadFile(inputDefFile)
	if inputFileBytesErr != nil {
		fmt.Printf("Failed to read %s: %v\n", inputDefFile, inputFileBytesErr)
		os.Exit(1)
	}
	var choiceDefs choiceDefinitions
	unmarshalErr := json.Unmarshal(inputFileBytes, &choiceDefs)
	if unmarshalErr != nil {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…