We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
之前读到context的定义,其中嵌入了上级类型,例如cancelCtx 中的Context
cancelCtx
Context
type cancelCtx struct { Context ...... }
我一直以为仅仅是重用了上一级的接口定义,与parent之间的联系由私有成员变量维护,而实际是直接在嵌入类型中存放了parent实例,之前一直没留意到,书中也没重点提及,感觉可以加强一下。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
之前读到context的定义,其中嵌入了上级类型,例如
cancelCtx
中的Context
我一直以为仅仅是重用了上一级的接口定义,与parent之间的联系由私有成员变量维护,而实际是直接在嵌入类型中存放了parent实例,之前一直没留意到,书中也没重点提及,感觉可以加强一下。
The text was updated successfully, but these errors were encountered: