How do I pass a list as a flag variable in Golang? For example in Bash you can pass a list as getopts to the script. Something like that:
./myScript.sh -n list_of_names.txt //some file with about 50 names
and later loop over the list:
#!/bin/bash
while getopts "n:h:" options; do
case "${options}" in
"n") NAME=${OPTARG};;
"h") PRINT_USAGE;;
esac
done
for i in $NAME; do
//TODO
I've heard about the "flag" package, but I have no idea how to achieve that
PS I'm a complete newbie to Go