Golang
刘泽美
我心净时,何时不见如来。
我心净处,何处不是西天。
展开
-
golang 内置性能优化工具 go pprof 使用
go pprof 性能分析和优化原创 2023-01-12 13:30:28 · 470 阅读 · 0 评论 -
go语言学习第三天
// day03package mainimport ( "fmt")//defer// 3 4 2 1(// 延迟执行-----先进后出func defer1() { defer fmt.Println("1") //延迟执行的函数 defer fmt.Println("2") //延迟执行的函数 fmt.Println("3") fmt.Println("4")...原创 2018-10-11 10:55:32 · 138 阅读 · 0 评论 -
感觉接口的理解还有些不是很清楚,强写一篇
原文:https://studygolang.com/articles/10524如果某个函数的入参是interface{},有下面几种方式可以获取入参的方法:1 fmt:import "fmt"func main() { v := "hello world" fmt.Println(typeof(v))}func typeof(v interface{}) strin...转载 2018-09-22 07:59:00 · 213 阅读 · 0 评论 -
go语言学习第一天
package mainimport ( "fmt" "time")//var Age inttype Age int//var age Agetype Score int//type Score struct{// age int// name string//}func (s Score) Info() { //类的成员函数,叫方法 if s == 10...原创 2018-10-05 23:12:14 · 191 阅读 · 0 评论