If you want to mix flags and "unflagged" arguments, like your integer, see the flag package.
"After parsing, the arguments following the flags are available as the slice flag.Args or individually as flag.Arg(i). The arguments are indexed from 0 through flag.NArg-1."
Your request is a little confusing because you have called what looks like a program, instead by the name "function". A program always contains the main() function, and typically many other functions as well. A program is executed on the command line in the way that you illustrated: "$ ./your_program "