草庐IT

IsSymlinks

全部标签

unit-testing - 如何为单元测试模拟标准包函数

我有三个功能:funcIsSymlinks(pathstring){......}func(c*MyClass)myFunc1(pathstring){...morecode...morecodeifIsSymlinks(path){realPath:=filepath.EvalSymlinks(path)}...morecode...morecode}funcmyFunc2(pathstring){...morecode...morecodeifIsSymlinks(path){realPath:=filepath.EvalSymlinks(path)}...morecode...m