var ( // Zustand des endlichen Automatens state int // Ergebnis™ resistorsPerContainer = 0 containerCount = 0 ) for _, arg := range os.Args { switch state { // Startzustand S0 case 0: switch arg { case '--help': PrintHelp() // break ist in Golang implizit case "--resistors-per-container": state = 1 case "--containers": state = 2 default: // error handling } // Zustand für --resistors-per-container case 1: resistorsPerContainer = [...] state = 0 // Zustand für --containers case 2: containerCount = [...] state = 0 } }