// Homework 32, problem 1: Repeat. // // Add a flag -n (an int, default 2). Join the words after the flags with spaces, // and print that line n times. With no words, print a usage line to standard // error and exit with code 2. If n is below 1, print an error to standard error // and exit with code 2. // // You will need to add "flag", "os" and "strings" to the imports. // // Run with: go run exercises/32/homework/01-repeat.go -n 3 hello world package main import "fmt" func main() { // TODO: define the flag, parse, check, and print, in place of this line: fmt.Println("TODO: replace this line") }