These architecture patterns are among the most commonly used in app development, whether on iOS or Android platforms. Developers have introduced them to overcome the limitations of earlier patterns. So, how do they differ?
GO的控制结构和别的语言差不多,都是if-else if-else的这种用法
Go的if else支持一种新的写法,可以在if-else块里面定义一个新的局部变量。
在右边的distance的只作用于if-else块,离开了这个范围就无法使用了。