go language [2] - control structure

1. if

  • without parentheses
  • variable initialization

2. for

  • Infinite loop
  • only one condition
  • complete three sentences

3. switch

  • expression after switch
  • There is no expression after switch, then case needs to be followed by 
  • fallthrough

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325983136&siteId=291194637