Context是结构体
```go
func newContext(path string, router, args []string, argvList []interface{}, clr color.Color) (*Context, error) {
ctx := &Context{
path: path,
router: router,
argvList: argvList,
nativeArgs: args,
color: clr,
flagSet: newFlagSet(),
}
if !isEmptyArgvList(argvList) {
ctx.flagSet = parseArgvList(args, argvList, ctx.color)
if ctx.flagSet.err != nil {
return ctx, ctx.flagSet.err
}
}
return ctx, nil
}
```
newContext()函数中的ctx := &Context{}是不是局部变量声明,在函数newContext()调用完毕后随时会释放&Context{}存储空间?
有疑问加站长微信联系(非本文作者)