Static local variable in Go

前端 未结 3 827
星月不相逢
星月不相逢 2021-02-11 16:35

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.<

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