关于defer Golang 官方博客专门发文 介绍过三条规则: defer语句被求值时,被defer调用的函数参数即时求值 A deferred function’s arguments are evaluated when the defer statement …