Go:方法值(func value) 和 方法表达式(func expression)
Go:func 函数

Go:func 函数

func 函数

func 函数(适用于 method)小结

Go 函数

数也是一种类型,可以和其他类型一样被保存在变量中。和接口一样,接口也是一种类型。

1
2
3
4
5
6
7
8
9
10
11
12
13
package main
import (
"fmt"
)
func foo() {
fmt.Println("foo")
}
func main() {
var f func()
f = foo
f()
}

Read more
Go tool pprof 性能监控调试工具基本使用说明

Go tool pprof 性能监控调试工具基本使用说明

Go tool pprof 使用方式

go 中有 pprof 包来做代码的性能监控主要涉及两个 pkg:

1
2
3
4
5
6
7
8
9
10
11
#web服务器:
import (
"net/http"
_ "net/http/pprof"
)

#一般应用程序(实际应用无web交互)
import (
"net/http"
_ "runtime/pprof"
)
Read more
Go:fmt.Printf() 格式化占位符
Jaco Liu Golang personal summary combing notes
travel hanghzou 2019.05.19

travel hanghzou 2019.05.19


杭城自旅小记 — 秋 Jaco Liu

2019.05.19
己亥夏初余足行,时节竹帘壁岭顷。
雾引青峦过龙井,偶有惊雀嬉零星。
曲径邻岩苔缕兴,十里山茶步履轻。
云栖闻泉鸟争鸣,竹径临溪沥雨惊。
少时暂驻净思省,沐风携雨心亦明。
Read more
The Legend of 1900

The Legend of 1900

  • 1、All that city you just couldn’t see an end to it.
    城市那么大,看不到尽头。

  • 2、The end? Please? Can you please just show me where it ends?
    尽头在哪里?可以给我看看尽头么?

Read more