标签:golang
lizhe 发布于 2022-01-01

Go语言有着很多的日志管理库,比如star数靠前的logrus,然而logrus库并不自带日志切割功能,想要做到日志切割,就需要用到file-rotatelogs库,这里就有个小问题。我在刚开始用的时候,代码如下 后来在运行的时候发现这段代码根本就不进行日志切割,后来在对比git...
阅读(1672)赞 (41)标签:file-rotatelogs / golang / go语言 / logrus
lizhe 发布于 2021-11-24

Any computer system in today’s world generates a very high amount of logs or data daily. As the system grows, it is not feasible to store th...
阅读(440)赞 (5)标签:golang
lizhe 发布于 2021-09-30

Golang可以用很短的代码实现HTTP和HTTPS服务 HTTP服务 HTTP是基于传输层TCP协议的。 package main import ( "net/http" "fmt" "log" ) func main() { http.HandleFunc("/", func...
阅读(678)赞 (4)标签:golang / net/http / ssl
lizhe 发布于 2021-08-19

《Network Programming with Go》分别有Jan Newmarch与 Adam Woodbeck 撰写的两个不同版本。网络上流传比较多为 Jan Newmarch 编写的,为开源版本。Adam Woodbeck 版 内容更为丰富,知识讲解更为详尽。
阅读(842)赞 (6)标签:golang / 网络编程
lizhe 发布于 2021-08-08
![]()
ℹ️ This article is based on Go 1.12. defer statement is a convenient way to execute a piece of code before a function returns...
阅读(509)赞 (2)标签:golang / goroutine / go编程之旅
lizhe 发布于 2021-08-08

To be proficient means that you have enough experience to know what the pitfalls of the platform you are using are and how to avoid them.
阅读(494)赞 (0)标签:golang / golang常见错误
lizhe 发布于 2021-06-24

Understand Handle, Handler, and HandleFunc in Go
阅读(580)赞 (22)标签:golang / net/http
lizhe 发布于 2021-05-27

操作系统的线程创建以及切换是需要开销的,会影响程序的性能。Go致力于尽可能地从内核中获取优势,所以从最开始的时候设计就考虑到了并发性。
阅读(879)赞 (1)标签:golang / goroutine
lizhe 发布于 2021-05-27

在 Go 中创建 Goroutine 既方便又快捷,然而 Go 在同一时间内最多在一个核上运行一个 Goroutine,因此需要一种方法来存放其他的 Goroutine,从而确保处理器(processor)负载均衡。 Goroutine 队列 Go 使用两级队列来管理等待中的 G...
阅读(891)赞 (0)标签:golang
lizhe 发布于 2021-05-26

Go 中创造所有的 goroutine 都是由内部的调度器管理。Go 调度器会尝试为所有 goroutine 分配运行时间,并在当前 goroutine 被阻止或终止时使所有 CPU 忙于运行 goroutine。 它实际上是作为特殊的 goroutine 运行的。 调度 gor...
阅读(1152)赞 (0)标签:golang / goroutine
最新评论
Great selection of modern and classic books waiting to be di
Leave me alone, I'm just taking a look
How is the COVID situation over there?
啥也不说了,希望疫情早点结束吧!
First time here, haha
你赢了🐂
这不是分手的潜台词吗?一般分手不都这么说的么
感谢最美大佬关怀