fe

command module
v1.0.1-0...-f7013e1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2018 License: BSD-3-Clause Imports: 6 Imported by: 0

README

fe

Command fe (Fix Examples) corrects errors produced by examples while running go test.

Installation

$ go get modernc.org/fe

Documentation: godoc.org/modernc.org/fe

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

Jump to

Keyboard shortcuts

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