Go中的標簽有什么用途?在GO語言規(guī)范,它提到了標簽的簡要概述:字段聲明后面可以跟著一個可選的String文字標記,它將成為相應(yīng)字段聲明中所有字段的屬性。標記通過反射接口顯示,但在其他方面則被忽略。// A struct corresponding to the TimeStamp protocol buffer.// The tag strings define the protocol buffer field numbers.struct {
microsec uint64 "field 1"
serverIP6 uint64 "field 2"
process string "field 3"}這是一個非常簡短的解釋,海事組織,我想知道是否有人可以提供給我這些標簽將是什么用途?
Go中的標簽有什么用途?
ibeautiful
2019-06-20 16:29:52