首页 > 解决方案 > Golang _ struct {} 在一个结构中。它的目的是什么?

问题描述

在下面的结构定义中,_ struct{}字段的用途是什么?为什么它在那里?

type DeleteItemOutput struct {
    _                     struct{}                   `type:"structure"`
    Attributes            map[string]*AttributeValue `type:"map"`
    ConsumedCapacity      *ConsumedCapacity          `type:"structure"`
    ItemCollectionMetrics *ItemCollectionMetrics     `type:"structure"`
}

标签: go

解决方案


推荐阅读