lab004

command
v0.0.0-...-f10d331 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 3 Imported by: 0

README

example04

注意点

  • 测试的时候可以使用monkey patch来做mock,有的时候这样可以方便测试
  • 运行main的时候,不会输出,因为reportExecFailed方法里面用了os.Exit(),这样就比较不好测试了。 所以我们可以用monkey,在测试里面,把reportExecFailed修改,去掉os.Exit()

运行结果

Imgur

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL