Tag:Murong Fu

  • Notes on go multivariable assignment


    When it comes to multivariable assignment, first calculate all relevant values, and then assign values from left to right, but this rule does not apply to pythonLet’s take an example package main import “fmt” func main() { Data, I: = [3] string {“Qiao Bangzhu”, “Murong Fu”, “Jiu Mozhi”}, 0 i. Data [i] = 2, “master […]

  • On the detailed use of go defer


    Delay call of defer:Defer feature: 1. The keyword defer is used to register delayed calls. 2. These calls are not executed until return. Therefore, it can be used for resource cleaning. 3. Multiple defer statements are executed in the way of first in and last out. 4. The variables in the defer statement are determined […]