原书出处
Cloud Native Go (Matthew A. Titmus)
03 Go Language Foundations
A type assertion can be applied to an interface value to “assert” its identity as a concrete type. The syntax takes the general form of x.(T), where x is an expression of an interface and T is the asserted type. Referring to the Shape interface and Circle struct we used above: var s Shape s
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Cloud Native Go (Matthew A. Titmus)/_epub-src/OEBPS/ch03.xhtml
EPUB SHA-256:1154caa7b61465daf957a7d8f1350ef24ab5db9c850cab5987aae5bc74986022