Static local variable in Go

前端 未结 2 2120
隐瞒了意图╮
隐瞒了意图╮ 2021-02-11 16:27

Is it possible to define a local variable in Go that can maintain its value from one function call to another? In C, we can do this using the reserved word static.<

2条回答
提交回复
热议问题