随笔分类 -  go语言

摘要:在Mac上安装gin 第一步:cd到项目目录 第二步:在项目目录下使用go mod,它会自动识别import导入所需要的包,并且自动下载。go mod init project 第三步:安装gin go get -u -v github.com/gin-gonic/gin 第四步:写一个程序用来测试 阅读全文
posted @ 2020-08-26 07:21 极光天际 阅读(1950) 评论(0) 推荐(0)
摘要:Go 语言内置的运算符有: 算术运算符 关系运算符 逻辑运算符 位运算符 赋值运算符 1.1算数运算符 运算符描述 + 相加 - 相减 * 相乘 / 相除 % 求余 注意: ++(自增)和--(自减)在Go语言中是单独的语句,并不是运算符。 1.2. 关系运算符 运算符描述 == 检查两个值是否相等 阅读全文
posted @ 2020-02-29 09:33 极光天际 阅读(175) 评论(0) 推荐(0)
摘要:Last login: Sat Feb 29 05:31:56 on console k@k-2 ~ % go Go is a tool for managing Go source code. Usage: go <command> [arguments] The commands are: bu 阅读全文
posted @ 2020-02-29 06:31 极光天际 阅读(179) 评论(0) 推荐(0)
摘要:由于Linux的Gnome桌面就是用GTK编写的,所以,Linux本身就包含GTK工具库,安装GTK工具库在线安装即可。 第一步:在终端输入: sudo apt-get install libgtk3.0* 第二步:在终端输入: pkg-config --cflags --libs gtk+-3.0 阅读全文
posted @ 2018-10-23 10:12 极光天际 阅读(974) 评论(0) 推荐(0)
摘要:1.在终端输入:xcode-select --install 安装command line工具, 如果安装了Xcode, 就直接跳过该步骤 2. 在终端输入:ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/instal 阅读全文
posted @ 2018-10-17 00:20 极光天际 阅读(2601) 评论(0) 推荐(0)
摘要:Packages Standard libraryOther packagesSub-repositoriesCommunity Standard library ▾ NameSynopsis archive tar Package tar implements access to tar arch 阅读全文
posted @ 2018-10-14 21:25 极光天际 阅读(809) 评论(0) 推荐(0)
摘要:Go 2 Draft Designs 28 August 2018 Yesterday, at our annual Go contributor summit, attendees got a sneak peek at preliminary drafts of possible designs 阅读全文
posted @ 2018-09-25 11:44 极光天际 阅读(295) 评论(0) 推荐(0)
摘要:Go 1.11 Release Notes Introduction to Go 1.11Changes to the languagePortsWebAssemblyRISC-V GOARCH values reservedToolsModules, package versioning, and 阅读全文
posted @ 2018-09-25 11:42 极光天际 阅读(483) 评论(0) 推荐(0)
摘要:Go 1.10 Release Notes Introduction to Go 1.10Changes to the languagePortsToolsDefault GOROOT & GOTMPDIRBuild & InstallTestCgoDocFixGetPprofVet Diagnos 阅读全文
posted @ 2018-09-25 11:38 极光天际 阅读(539) 评论(0) 推荐(0)
摘要:Go 1.9 Release Notes Introduction to Go 1.9Changes to the languagePortsppc64x requires POWER8FreeBSDOpenBSD 6.0Known IssuesToolsParallel CompilationVe 阅读全文
posted @ 2018-09-25 11:32 极光天际 阅读(260) 评论(0) 推荐(0)
摘要:Go 1.8 Release Notes Introduction to Go 1.8Changes to the languagePortsKnown IssuesToolsAssemblerYaccFixPprofTraceVetCompiler ToolchainCgoGccgoDefault 阅读全文
posted @ 2018-09-25 11:31 极光天际 阅读(233) 评论(0) 推荐(0)
摘要:Go 1.6 Release Notes Introduction to Go 1.6Changes to the languagePortsToolsCgoCompiler ToolchainGccgoGo commandGo doc commandGo vet command Performan 阅读全文
posted @ 2018-09-25 11:30 极光天际 阅读(175) 评论(0) 推荐(0)
摘要:Go 1.7 Release Notes Introduction to Go 1.7Changes to the languagePortsKnown IssuesToolsAssemblerCompiler ToolchainCgoGccgoGo commandGo docGo vet Go t 阅读全文
posted @ 2018-09-25 11:30 极光天际 阅读(261) 评论(0) 推荐(0)
摘要:Go 1.5 Release Notes Introduction to Go 1.5Changes to the languageMap literalsThe ImplementationNo more CCompiler and toolsGarbage collectorRuntimeBui 阅读全文
posted @ 2018-09-25 11:29 极光天际 阅读(227) 评论(0) 推荐(0)
摘要:Go 1.3 Release Notes Introduction to Go 1.3Changes to the supported operating systems and architecturesRemoval of support for Windows 2000Support for 阅读全文
posted @ 2018-09-25 11:28 极光天际 阅读(208) 评论(0) 推荐(0)
摘要:Go 1.4 Release Notes Introduction to Go 1.4Changes to the languageFor-range loopsMethod calls on **TChanges to the supported operating systems and arc 阅读全文
posted @ 2018-09-25 11:28 极光天际 阅读(171) 评论(0) 推荐(0)
摘要:Go 1.2 Release Notes Introduction to Go 1.2Changes to the languageUse of nilThree-index slicesChanges to the implementations and toolsPre-emption in t 阅读全文
posted @ 2018-09-25 11:27 极光天际 阅读(270) 评论(0) 推荐(0)
摘要:Go 1.1 Release Notes Introduction to Go 1.1Changes to the languageInteger division by zeroSurrogates in Unicode literalsMethod valuesReturn requiremen 阅读全文
posted @ 2018-09-25 11:26 极光天际 阅读(210) 评论(0) 推荐(0)
摘要:Go 1 Release Notes Introduction to Go 1Changes to the languageAppendCloseComposite literalsGoroutines during initThe rune typeThe error typeDeleting f 阅读全文
posted @ 2018-09-25 11:24 极光天际 阅读(283) 评论(0) 推荐(0)
摘要:The Go Project Go is an open source project developed by a team at Google and many contributors from the open source community. Go is distributed unde 阅读全文
posted @ 2018-09-25 11:23 极光天际 阅读(351) 评论(0) 推荐(0)