Merge pull request #377 from seppestas/typo-fixes

Fixed minor typo
This commit is contained in:
Ernesto Jiménez 2016-12-17 13:16:51 -06:00 committed by GitHub
commit 211175bc28

View File

@ -279,7 +279,7 @@ func (m *Mock) Called(arguments ...interface{}) Arguments {
functionPath := runtime.FuncForPC(pc).Name() functionPath := runtime.FuncForPC(pc).Name()
//Next four lines are required to use GCCGO function naming conventions. //Next four lines are required to use GCCGO function naming conventions.
//For Ex: github_com_docker_libkv_store_mock.WatchTree.pN39_github_com_docker_libkv_store_mock.Mock //For Ex: github_com_docker_libkv_store_mock.WatchTree.pN39_github_com_docker_libkv_store_mock.Mock
//uses inteface information unlike golang github.com/docker/libkv/store/mock.(*Mock).WatchTree //uses interface information unlike golang github.com/docker/libkv/store/mock.(*Mock).WatchTree
//With GCCGO we need to remove interface information starting from pN<dd>. //With GCCGO we need to remove interface information starting from pN<dd>.
re := regexp.MustCompile("\\.pN\\d+_") re := regexp.MustCompile("\\.pN\\d+_")
if re.MatchString(functionPath) { if re.MatchString(functionPath) {