摘要: 一、环境 centos:7.x go: 1.15.5 二、项目编译 windows命令行执行 D:\golangProject> SET CGO_ENABLED=0 D:\golangProject> SET GOOS=linux D:\golangProject> SET GOARCH=amd64 阅读全文
posted @ 2021-02-03 16:49 Auler 阅读(209) 评论(0) 推荐(0)
摘要: 一、报错 github.com/aaa/yyy: github.com/aaa/yyy@v1.14.6: parsing go.mod: module declares its path as: github.com/xxx/yyy but was required as: github.com/a 阅读全文
posted @ 2021-01-30 15:55 Auler 阅读(957) 评论(0) 推荐(0)
摘要: 一、安装 系统:centos7.x elastic版本:6.7.2 java版本:1.8 [root@zrl /]# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.7.2.tar.gz #下载文件 阅读全文
posted @ 2020-12-27 15:08 Auler 阅读(133) 评论(0) 推荐(0)
摘要: 一、定义 B树B-tree,B-树其实就是B树,英文名balanced tree。一棵m阶B树(balanced tree of order m)是一棵平衡的m路搜索树。它或者是空树,或者是满足下列性质的树: 1、根结点至少有两个子女; 2、每个非根节点所包含的关键字个数 j 满足:┌m/2┐ - 阅读全文
posted @ 2020-12-21 21:00 Auler 阅读(1013) 评论(0) 推荐(0)
摘要: 一、环境安装 系统:centos7 nginx下载地址:https://nginx.org/en/download.html 下载 PCRE 安装包,下载地址:https://sourceforge.net/projects/pcre/files/pcre/ [root@zrl tool]# yum 阅读全文
posted @ 2020-12-11 08:23 Auler 阅读(711) 评论(0) 推荐(0)
摘要: 一、接口 type Car interface { //定义一个Car的接口 what() //定义一个方法 } type Bicycle struct { } type Motor struct { } func (bicycle Bicycle) what() { fmt.Println("I 阅读全文
posted @ 2020-12-02 18:52 Auler 阅读(129) 评论(0) 推荐(0)
摘要: 一、切片Slice func main() { fmt.Println("Hello, World!") s := []int{1, 2, 3} //数组 printSlice(s) fmt.Println(s[0:2]) //使用切片方式 fmt.Println(s[:2]) fmt.Printl 阅读全文
posted @ 2020-12-02 13:27 Auler 阅读(103) 评论(0) 推荐(0)
摘要: 一、数组 package main import "fmt" //全局变量 var g int = 10 //声明一个函数类型 type cb func(int) int func main() { fmt.Println("Hello, World!") var arr [5]int //一维数组 阅读全文
posted @ 2020-12-01 19:59 Auler 阅读(121) 评论(0) 推荐(0)
摘要: 一、常量 const a int = 123 //常量定义const,显式 //a = 456 //修改常量值,会报错 Cannot assign to a,无法赋值 const b = 23 //隐式 const c,d = 1,"s" //多重赋值 const e,f int = 6,7 //多 阅读全文
posted @ 2020-12-01 17:38 Auler 阅读(75) 评论(0) 推荐(0)
摘要: 一、语言结构 //这个package是包声明(类似声明变量)//mian是被声明的包名(取main是go程序是可独立执行程序!!!)//文件命名不需要一致,例如test.go文件含有package main也可以当作可独立执行程序 package main //fmt是这个程序引入的包,可以调用fm 阅读全文
posted @ 2020-11-30 22:38 Auler 阅读(93) 评论(0) 推荐(0)