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
ページ番号:p65 セクション番号:3.5.1 内容タイトル:タグの記法 誤っている内容:Go1.16から導入される短縮表記について 正しい内容:結局は導入されませんでした。 その他コメント:
Go1.16でapproveはされて一度導入までは至ったのですが、結局は導入されませんでした。 理由としては以下のコードの場合に
type User struct { Name string `json xml:"other_tag"` } func main() { var u User fmt.Printf("json tag: %q\n", reflect.TypeOf(u).Field(0).Tag.Get("json")) }
Go1.15: "" Go1.16: "other_tag"
を返すようになります。これはGoの後方互換性の点からrevertを行うという決断に至ったようです。
golang/go#40281 (comment)
The text was updated successfully, but these errors were encountered:
ご指摘ありがとうございます。著者さんより以下のコメントを頂戴しました。
ご指摘ありがとうございます。マージ後の削除まで追いかけられていませんでした。3刷では「Go 1.16から導入される予定だった短縮表記」として解説し、改訂があるのであればそのときに削除しようと思います。
Sorry, something went wrong.
orj-takizawa
No branches or pull requests
ページ番号:p65
セクション番号:3.5.1
内容タイトル:タグの記法
誤っている内容:Go1.16から導入される短縮表記について
正しい内容:結局は導入されませんでした。
その他コメント:
Go1.16でapproveはされて一度導入までは至ったのですが、結局は導入されませんでした。
理由としては以下のコードの場合に
Go1.15: ""
Go1.16: "other_tag"
を返すようになります。これはGoの後方互換性の点からrevertを行うという決断に至ったようです。
golang/go#40281 (comment)
The text was updated successfully, but these errors were encountered: