2021年9月1日
摘要:
编译: cd squid-2.5.STABLE4 ./configure --enable-icmp --enable-htcp make 安装: su password: make install 假如你通过使用--enable-icmp 选项,激活了 squid 的 ICMP 衡量功能,那么必
阅读全文
posted @ 2021-09-01 13:15
清明-心若淡定
阅读(436)
推荐(0)
摘要:
代理: Squid是什么? Squid是一种用来缓冲Internet数据的软件。它是这样实现其功能的,接受来自人们需要下载的目标(object)的请求并适当地处理这些请求。也就是说,如果一个人想下载一web页面,他请求Squid为他取得这个页面。Squid随之连接到远程服务器(比如:http://s
阅读全文
posted @ 2021-09-01 11:30
清明-心若淡定
阅读(595)
推荐(0)
2021年8月20日
摘要:
数组 数组是类型相同的元素的集合。例如,整数 5, 8, 9, 79, 76 的集合就构成了一个数组。Go不允许在数组中混合使用不同类型的元素(比如整数和字符串)。 声明 var variable_name [SIZE] variable_type 有很多声明数组的方式,让我们一个一个地介绍。 pa
阅读全文
posted @ 2021-08-20 15:31
清明-心若淡定
阅读(435)
推荐(0)
摘要:
目录 GoPath + Govendor go.mod 其他依赖管理工具:glide、dep、go dep... 三阶段:GoPath 、GOVENDOR、 go.mod GoPath + GOVENDOR vendor 特性则作为 GOPATH 模式补充 每个项目都会有一个vendor目录,存放第
阅读全文
posted @ 2021-08-20 14:38
清明-心若淡定
阅读(104)
推荐(0)
摘要:
1 常规 常用于导入GO的核心包 import( "fmt" ) //调用 fmt.Println("hello world") 上面这个fmt是Go语言的标准库,他其实是去GOROOT下去加载该模块 2 路径 前面介绍Go如何import它的核心库,那么,在我们自己创建的项目,模块中的代码如何im
阅读全文
posted @ 2021-08-20 14:05
清明-心若淡定
阅读(930)
推荐(0)
摘要:
go get -u all go get -u go mod update go get -u full_package_name go get -u github.com/... // ('...' being the wildcard). go get -u github.com/orgA/..
阅读全文
posted @ 2021-08-20 14:01
清明-心若淡定
阅读(135)
推荐(0)
摘要:
设置GOROOT和GOPATH GOROOT应为go的安装目录。 GOPATH可以设定为自己想要的位置,以后go项目需要的依赖库都会存放在这个路径下面。 GOPATH: Go项目结构 在进行Go语言开发的时候,我们的代码总是会保存在$GOPATH/src目录下。在工程经过go build、go in
阅读全文
posted @ 2021-08-20 13:49
清明-心若淡定
阅读(979)
推荐(0)
2021年8月19日
摘要:
https://github.com/golang/go/issues/38673 that error is triggered by the makeslice function in the runtime, when the len argument of make( ) called on
阅读全文
posted @ 2021-08-19 11:37
清明-心若淡定
阅读(1881)
推荐(0)
2021年5月19日
摘要:
package main import ( "bufio" "fmt" "regexp" "strings" // "io/ioutil" //io 工具包 "os" ) func rip() []string { var slice []string r, _ := os.Open("100cli
阅读全文
posted @ 2021-05-19 21:53
清明-心若淡定
阅读(64)
推荐(0)
2021年5月16日
摘要:
1.$add操作符(+) 1.1 语法及功能介绍 $add 操作符主要用于将一组数字相加;也可以用于在指定时间上添加一定的时间间隔。时间间隔单位为milliseconds(毫秒)。 $add操作符的语法: { $add: [ <expression1>, <expression2>, ... ] }
阅读全文
posted @ 2021-05-16 08:58
清明-心若淡定
阅读(872)
推荐(0)