多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# 第1.4结构体 结构体复杂类型 ``` <pre class="calibre16">``` type Point struct <span class="token2">{</span> X int Y int <span class="token2">}</span> var p Point 初始化结构体 p<span class="token2">.</span>X <span class="token">=</span> <span class="token3">10</span> p<span class="token2">.</span>Y <span class="token">=</span> <span class="token3">20</span> test <span class="token2">:</span><span class="token">=</span><span class="token5">new</span><span class="token2">(</span>Point<span class="token2">)</span> 指针类型结构体初始化 test <span class="token2">:</span><span class="token">=</span> <span class="token">&</span>Point<span class="token2">{</span> name<span class="token2">:</span><span class="token4">"测试"</span> <span class="token2">}</span> 去结构体地址实例化 ``` ```