go
文章平均质量分 53
格來羙、日出
这个作者很懒,什么都没留下…
展开
-
go编程基础01 开发环境搭建
什么是Go?Go是一门并发支持、垃圾回收的编译形系统语言,具有静态编译的高性能和动态语言的高效开发的。Go语言的特点有哪些?类型安全和内存安全 以直观和低代价实现高并发 高效的垃圾回收机制 快速编译(解决C语言中文头文件太多) 支持UTF8编码安装Go语言Go官方下载包:https://golang.google.cn/Go语言环境变量与工作目录GOPATH:工作目录bin:存放编译后生成的可执行文件 pkg:存放编译后生成的包文件(.a文件) src :存放项目源原创 2021-03-29 14:18:03 · 115 阅读 · 0 评论 -
go编程基础02 基础知识
首先感谢无闻老师的指导https://github.com/unknwonGo内置关键字(25个均为小写)break default func interface selectcase defer go map structchan else goto package switchconst fallthrough if range typecontinu.原创 2021-03-30 11:08:56 · 76 阅读 · 0 评论 -
go编程基础03 类型与变量
首先感谢无闻老师的指导https://github.com/unknwon上节课作业:声明多个常亮与变量//常量的定义const ( PI = 3.14 const1 = "1")//全局变量的定义var ( name1 = 3.14 name2 = "1")//一般类型声明type ( newType int type1 float32 type2 string type3 byte)Go基本类型.原创 2021-03-30 15:46:01 · 88 阅读 · 0 评论 -
Go修改下载源
go env -w GO111MODULE=ongo env -w GOPROXY=https://goproxy.cn,direct原创 2021-12-24 21:13:05 · 986 阅读 · 0 评论 -
Sublime Text安装go语言开发
1、安装Sublime Text官方地址:http://www.sublimetext.com/32、下载插件打开地址Gosublime:https://github.com/DisposaBoy/GoSublime,下载zip,尝试多次git clone下载失败。3、自动补全功能Perferences–Browse Packages…,进入Gosublime:把第二部的包解压到这里,名称必须是GoSublime。我的目录是C:\Users\HIGHGO\AppData\Roam.原创 2021-03-29 14:36:24 · 567 阅读 · 0 评论 -
go语言引入本地依赖包
在go语言项目中,引入本地包很常见,举个例子。postgres_exporter 引入本地的pq。下载和运行postgres_exporter下载postgres数据使用驱动:git clone git@github.com:lib/pq.gitpackage mainimport (... "github.com/lib/pq"...查看源码位置[root@baidu1 postgres_exporter]# pwd/gopath/postgres_exp原创 2021-03-19 16:53:25 · 3400 阅读 · 0 评论 -
go github timeout
go下载资源报连接超时[root@baidu pinyin]# go run main.go go: finding module for package github.com/mattn/go-isattymain.go:10:2: module github.com/mattn/go-isatty: Get "https://proxy.golang.org/github.com/mattn/go-isatty/@v/list": dial tcp 34.64.4.17:443: i/o t.原创 2020-07-29 10:40:19 · 1635 阅读 · 0 评论 -
龙芯编译go语言开发环境
龙芯 arch:mips64le官方教程:http://www.loongson.cn/news/company/456.html1、下载、解压找一台装有64位Linux的系统,我用的是contos7.4go1.4安装包https://golang.google.cn/doc/install?download=go1.4.linux-amd64.tar.gzgo1.14.6源码https://golang.google.cn/doc/install/source?downloa....原创 2020-07-28 16:35:12 · 2236 阅读 · 1 评论