我正在查看chi包的文檔。我看到的是這樣的:Golang struct {} {}含義
https://github.com/pressly/chi/blob/master/_examples/rest/main.go#L154
data := struct {
*Article
OmitID interface{} `json:"id,omitempty"` // prevents 'id' from being overridden
}{Article: article}
我該如何解讀? 2部分我不完全瞭解
OmitID
部分如何防止id
被設置?{Article: article}
部件是做什麼的?
您提供的鏈接是你的代碼不同,你從不同得到承諾? –