我在阅读远吗的时候,看到一个结构体这样定义:
type apiController struct {
address *string
key *string
hash *string
cert *string
ctx context.Context
}
对此我有两个问题:
- 为何
address *string
定义属性,而不是address string
来定义? ctx context.Context
来定义ctx,而不是使用ctx *context.Context
?