This example shows opening files from command-line arguments and copying their content to standard output.
$ go run . *.txt
And another one gone,
and another one gone
Another one bites the dust
You should get the same output as calling cat
with no options.
Exercise: modify this program to handle -
as a command line argument and read from standard input (i.e., from a pipe).