After reading <Go in Action> and <Effective Go>, i am going to study the Go standard library next.
6/2, notes on builtin and runtime package:
slice.go, map.go and chan.go are of special interest within package runtime:
Slice append operation will call growslice if necessary, which returns the new slice.
How to get __FILE__ and __LINE__ similar to C/C++ in golang?
func file() string {
_, file, _, _ := runtime.Caller(1)
return file
}
func line() int {
_, _, line, _ := runtime.Caller(1)
return line
}