Documentation ¶
Overview ¶
Command fe (Fix Examples) corrects errors produced by examples while running go test.
For example
$ go test | fe
or perhaps
$ go test -run ^Example | fe
will parse the output of go test for the package in current directory. If there are errors in examples[0] (got != want), the actual output (got) is written back to the example in its respective *_test.go file, assuming it's properly gofmt'ed.
Any, potentially erroneous, example output is considered valid and incorporated back into the example. No backups are made, use carefully.
Named files are not supported by design.
[0]: http://golang.org/pkg/testing/#hdr-Examples
Click to show internal directories.
Click to hide internal directories.