You can access the command-line arguments using the os.Args variable. For example,
package main
import (
"fmt"
"os"
)
func main() {
fmt.Println(len(os.Args), os.Args)
}
You can also use the flag package, which implements command-line flag parsing.