上一页 1 2 3 4 5 6 7 8 9 ··· 14 下一页
摘要: 执行git clone的时候出现报错 git: 'remote-http' is not a git command. See 'git --help' 解决 yum install libcurl-devel yum install curl-devel 再将git进行重新编译,即可解决 阅读全文
posted @ 2022-04-01 22:23 请务必优秀 阅读(7231) 评论(0) 推荐(0) 编辑
摘要: 进行源码编译的时候报错 cache.h:21:18: fatal error: zlib.h: No such file or directory #include <zlib.h> ^ compilation terminated. make: *** [fuzz-commit-graph.o] 阅读全文
posted @ 2022-04-01 21:27 请务必优秀 阅读(3960) 评论(0) 推荐(1) 编辑
摘要: # kubectl get ns NAME STATUS AGE cloudzone Active 23h default Active 7d23h edgemesh Active 25h edgezone Active 22h kube-node-lease Active 7d23h kube-p 阅读全文
posted @ 2022-03-26 16:22 请务必优秀 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 创建 声明 var ch chan int 赋值 无缓冲 channel:元素类型为 T ch1 := make(chan int) 带缓冲 channel:元素类型为 T、缓冲区长度为 capacity ch2 := make(chan int, 5) 发送与接收 ch1 <- 13 // 将整型 阅读全文
posted @ 2022-03-22 14:45 请务必优秀 阅读(555) 评论(1) 推荐(0) 编辑
摘要: Goroutine 调度器 Goroutine 占用的资源非常小,每个 Goroutine 栈的大小默认是 2KB。而且,Goroutine 调度的切换也不用陷入(trap)操作系统内核层完成,代价很低。因此,一个 Go 程序中可以创建成千上万个并发的 Goroutine。而将这些 Goroutin 阅读全文
posted @ 2022-03-22 13:49 请务必优秀 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 并发设计:将程序分成多个可独立执行的部分的结构化程序的设计方法 并发不是并行。并发是应用结构设计相关的概念,而并行只是程序执行期的概念,并行的必要条件是具有多个处理器或多核处理器,否则无论是否是并发的设计,程序执行时都有且仅有一个任务可以被调度到处理器上执行。 goroutine是由 Go 运行时( 阅读全文
posted @ 2022-03-21 20:24 请务必优秀 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 相对于操作系统线程,Goroutine 的开销十分小,一个 Goroutine 的起始栈大小为 2KB,而且创建、切换与销毁的代价很低,可以创建成千上万甚至更多 Goroutine。所以和其他语言不同的是,Go 应用通常可以为每个新建立的连接创建一个对应的新 Goroutine,甚至是为每个传入的请 阅读全文
posted @ 2022-03-21 17:52 请务必优秀 阅读(797) 评论(0) 推荐(0) 编辑
摘要: sudo apt-get update sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common 添加国内镜像GPG证书 curl -fsSL http://mirrors. 阅读全文
posted @ 2022-03-17 12:36 请务必优秀 阅读(844) 评论(0) 推荐(0) 编辑
摘要: 在使用ubuntu系统时遇到,执行以下即可: apt-get -y install sudo 阅读全文
posted @ 2022-03-17 12:03 请务必优秀 阅读(2021) 评论(0) 推荐(0) 编辑
摘要: 使用defer实现函数执行过程的跟踪 package main func Trace(name string) func() { println("enter:", name) return func() { println("exit:", name) } } func foo() { defer 阅读全文
posted @ 2022-03-14 22:07 请务必优秀 阅读(286) 评论(0) 推荐(1) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 14 下一页