摘要:intro 在阅读k8s的源代码时,发现代码中有一个(一组)很简单粗暴的interface转换:将一个interface(storage对象)尝试向各种类型转换。golang中每个结构的method并不是在结构内定义,在类型转换的时候,运行时只要判断转换源实现了目的类型的所有method就可以成功完
阅读全文
posted @ 2025-10-29 21:22
posted @ 2025-10-29 21:22
posted @ 2025-03-22 18:06
posted @ 2025-01-07 18:05
posted @ 2023-11-09 20:33
posted @ 2023-10-30 20:01