<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>编程语言 on Zayn's Blog</title><link>https://blog.treesir.pub/categories/%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8%80/</link><description>Recent content in 编程语言 on Zayn's Blog</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><managingEditor>yangzun@treesir.pub (Zayn)</managingEditor><webMaster>yangzun@treesir.pub (Zayn)</webMaster><copyright>2021-2026 Zayn</copyright><lastBuildDate>Fri, 02 Dec 2022 14:58:28 +0800</lastBuildDate><atom:link href="https://blog.treesir.pub/categories/%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8%80/index.xml" rel="self" type="application/rss+xml"/><item><title>Go 语言完整实战指南</title><link>https://blog.treesir.pub/posts/golang-docs/</link><pubDate>Fri, 02 Dec 2022 14:58:28 +0800</pubDate><author>yangzun@treesir.pub (Zayn)</author><guid>https://blog.treesir.pub/posts/golang-docs/</guid><description>&lt;p>Go 语言是 Google 开发的现代编程语言，专为构建简单、可靠、高效的软件而设计。本指南将从基础概念开始，逐步深入到高级特性和实际应用，帮助您全面掌握 Go 语言的开发技能。&lt;/p>
&lt;h2 class="relative group">Go 语言概述
&lt;div id="go-语言概述" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#go-%e8%af%ad%e8%a8%80%e6%a6%82%e8%bf%b0" aria-label="锚点">#&lt;/a>
&lt;/span>
&lt;/h2>
&lt;h3 class="relative group">什么是 Go
&lt;div id="什么是-go" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#%e4%bb%80%e4%b9%88%e6%98%af-go" aria-label="锚点">#&lt;/a>
&lt;/span>
&lt;/h3>
&lt;p>Go（也称为 Golang）是一种开源的编程语言，由 Google 在 2009 年发布。它具有以下核心特性：&lt;/p></description></item><item><title>Go 语言结构体（Struct）详解与实践</title><link>https://blog.treesir.pub/posts/go-lang-struct/</link><pubDate>Sun, 15 Aug 2021 20:00:50 +0800</pubDate><author>yangzun@treesir.pub (Zayn)</author><guid>https://blog.treesir.pub/posts/go-lang-struct/</guid><description>&lt;p>Go 语言中的结构体（Struct）是一种用户自定义的数据类型，用于将不同类型的数据组合在一起。虽然 Go 不是传统的面向对象语言，但通过结构体和方法，我们可以实现面向对象编程的核心概念。&lt;/p>
&lt;h2 class="relative group">什么是结构体
&lt;div id="什么是结构体" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#%e4%bb%80%e4%b9%88%e6%98%af%e7%bb%93%e6%9e%84%e4%bd%93" aria-label="锚点">#&lt;/a>
&lt;/span>
&lt;/h2>
&lt;p>结构体是 Go 语言中实现数据封装的主要方式，它具有以下特点：&lt;/p>
&lt;ul>
&lt;li>&lt;strong>数据聚合&lt;/strong>: 将相关的数据字段组合在一起&lt;/li>
&lt;li>&lt;strong>类型安全&lt;/strong>: 编译时检查字段类型&lt;/li>
&lt;li>&lt;strong>方法绑定&lt;/strong>: 可以为结构体定义方法&lt;/li>
&lt;li>&lt;strong>内存效率&lt;/strong>: 字段在内存中连续存储&lt;/li>
&lt;/ul>
&lt;h2 class="relative group">基础结构体定义
&lt;div id="基础结构体定义" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#%e5%9f%ba%e7%a1%80%e7%bb%93%e6%9e%84%e4%bd%93%e5%ae%9a%e4%b9%89" aria-label="锚点">#&lt;/a>
&lt;/span>
&lt;/h2>
&lt;h3 class="relative group">简单结构体示例
&lt;div id="简单结构体示例" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#%e7%ae%80%e5%8d%95%e7%bb%93%e6%9e%84%e4%bd%93%e7%a4%ba%e4%be%8b" aria-label="锚点">#&lt;/a>
&lt;/span>
&lt;/h3>
&lt;p>让我们通过一个图书管理的例子来学习结构体的使用：&lt;/p></description></item></channel></rss>