﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Golang &#8211; 学术创新中心</title>
	<atom:link href="https://www.leexinghai.com/aic/author/golang/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.leexinghai.com/aic</link>
	<description>Academic Innovation Center</description>
	<lastBuildDate>Sat, 06 May 2023 01:11:25 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.leexinghai.com/aic/wp-content/uploads/2025/08/cropped-徽标名称-32x32.jpg</url>
	<title>Golang &#8211; 学术创新中心</title>
	<link>https://www.leexinghai.com/aic</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>2.Golang&#8211;HelloWord</title>
		<link>https://www.leexinghai.com/aic/2-golang-helloword/</link>
		
		<dc:creator><![CDATA[Golang]]></dc:creator>
		<pubDate>Sat, 06 May 2023 01:07:35 +0000</pubDate>
				<category><![CDATA[Golang练习教程]]></category>
		<guid isPermaLink="false">https://aic.leexinghai.com/?p=2284</guid>

					<description><![CDATA[Go的工作区： GoPath设置为E:\Go_Perjctr(项目位置) GORoot设置E:GObin(GO [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="has-medium-font-size"><strong>Go的工作区：</strong></p>



<p> GoPath设置为E:\Go_Perjctr(项目位置)</p>



<p>GORoot设置E:GObin(GO安装位置)</p>



<p class="has-medium-font-size"><strong>创建简单helloword.go如下：</strong></p>



<p><code>package main</code></p>



<p><code>improt "fmt"</code></p>



<p><code>func main(){</code></p>



<p>  <code>     fmt.Println("Hello word")</code></p>



<p><code>}</code></p>



<p class="has-medium-font-size"><sup><strong>运行go helloword.go程序：</strong></sup><kbd><br></kbd>使用 <code>go run</code> 命令 - 在命令提示符旁，输入 <code>go run helloword.go</code></p>



<p class="has-medium-font-size">在控制台上会看见&nbsp;<code>Hello World</code>&nbsp;的输出</p>



<p class="has-medium-font-size">使用&nbsp;<strong>go install</strong>&nbsp;命令 - 运行&nbsp;<code>go install hello</code>，接着可以用&nbsp;<code>workspacepath/bin/hello</code>&nbsp;来运行该程序。</p>



<p></p>



<p class="has-medium-font-size"><strong>简单解释代码：</strong></p>



<p><strong><code>package main</code> - 每一个 Go 文件都应该在开头进行&nbsp;<code>package name</code>&nbsp;的声明</strong></p>



<p><code><strong>import "fmt"</strong>&nbsp;</code>- 我们引入了<code> fmt </code>包，用于在 main 函数里面打印文本到标准输出。</p>



<p><code><strong>func main()</strong>&nbsp;- main</code> 是一个特殊的函数。整个程序就是从<code> main </code>函数开始运行的。<strong>main 函数必须放置在 main 包中</strong>。<code>{</code>&nbsp;和&nbsp;<code>}</code>&nbsp;分别表示 main 函数的开始和结束部分。</p>



<p><code><strong>fmt.Println("Hello World")</strong>&nbsp;-&nbsp;<strong>fm</strong></code><strong>t</strong>&nbsp;包中的&nbsp;<strong>Println</strong>&nbsp;函数用于把文本写入标准输出。</p>



<p></p>



<p></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Golang环境配置</title>
		<link>https://www.leexinghai.com/aic/golang%e7%8e%af%e5%a2%83%e9%85%8d%e7%bd%ae/</link>
		
		<dc:creator><![CDATA[Golang]]></dc:creator>
		<pubDate>Wed, 03 May 2023 12:34:24 +0000</pubDate>
				<category><![CDATA[Golang练习教程]]></category>
		<guid isPermaLink="false">https://aic.leexinghai.com/?p=2266</guid>

					<description><![CDATA[Go（又称Golang）是Google公司开发的一种静态强类型、编译型、并发型、并具有垃圾回收功能的编程语言。 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><strong>          Go（又称Golang）是Google公司开发的一种静态强类型、编译型、并发型、并具有垃圾回收功能的编程语言。Go是编译型语言，使用编译器来编译代码。编译器将源代码编译成二进制（或字节码）格式；在编译代码时，编译器检查错误、优化性能并输出可在不同平台上运行的二进制文件。</strong></p>



<p>Go官网地址：https://golang.google.cn/</p>



<p>1.Go1.20.4版本选择下载（傻瓜式安装下一步）</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="403" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-1024x403.png" alt="" class="wp-image-2267" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-1024x403.png 1024w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-300x118.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-768x302.png 768w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image.png 1484w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>2.配置环境 </p>



<p>GOROOT：Go安装路径（例：E:\Go）</p>



<p>GOPATH：Go工程的路径（例：E:\Go_Projext）</p>



<figure class="wp-block-image size-full"><img decoding="async" width="504" height="520" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-1.png" alt="" class="wp-image-2268" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-1.png 504w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-1-291x300.png 291w" sizes="(max-width: 504px) 100vw, 504px" /></figure>



<p>3. cmd 查看安装成功  go version</p>



<figure class="wp-block-image size-full"><img decoding="async" width="896" height="308" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-2.png" alt="" class="wp-image-2269" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-2.png 896w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-2-300x103.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-2-768x264.png 768w" sizes="(max-width: 896px) 100vw, 896px" /></figure>



<p>4. go env 修改为国内源地址</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="535" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-3-1024x535.png" alt="" class="wp-image-2270" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-3-1024x535.png 1024w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-3-300x157.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-3-768x401.png 768w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-3.png 1239w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>5.GoLand官网</p>



<p>GoLand：https://www.jetbrains.com/go/</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="481" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-4-1024x481.png" alt="" class="wp-image-2271" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-4-1024x481.png 1024w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-4-300x141.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-4-768x361.png 768w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-4.png 1070w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>1.安装流程</p>



<p>默认安装，设置安装位置如<code>D:\Program Files\JetBrains</code></p>



<p>激活：点击一键工具，激活后出现success</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="564" height="414" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-5.png" alt="" class="wp-image-2272" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-5.png 564w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-5-300x220.png 300w" sizes="auto, (max-width: 564px) 100vw, 564px" /></figure>



<p>案例参考如果是学生，可以使用学生证来申请账号认证</p>



<p class="has-black-color has-text-color">个人建议用正规来激活，破解可能会带什么东东，你也不知道</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
