xumu1
Results
2
comments of
xumu1
Edit GOPATH of the file (/.gvm/environments/default and same level config) , then`gvm use go1.x`(anyway, let it changed). Now the GOPATH is your specify.
这块想了很久,其实学过java的要理解很简单。 java最早是不支持给接口参数里传函数的,其实1.8之后就是对函数式接口做了些处理,使得可以直接穿匿名函数/lambda表达式。 golang也是为了向接口参数里传函数,所以取了个巧,让函数继承了接口,从而接口型函数可以接受(转换自)匿名函数,从而名正言顺地往接口里传函数,否则其实是类型不匹配的。