Fixes godoc links in example tests (#459)
thanks for noticing this @mathetake Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
@@ -4,11 +4,11 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
// ExampleMain ensures the following will work:
|
||||
// Example_main ensures the following will work:
|
||||
//
|
||||
// go build add.go
|
||||
// ./add 7 9
|
||||
func ExampleMain() {
|
||||
func Example_main() {
|
||||
|
||||
// Save the old os.Args and replace with our example input.
|
||||
oldArgs := os.Args
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package main
|
||||
|
||||
// ExampleMain ensures the following will work:
|
||||
// Example_main ensures the following will work:
|
||||
//
|
||||
// go build multiple-results.go
|
||||
// ./multiple-results
|
||||
func ExampleMain() {
|
||||
func Example_main() {
|
||||
|
||||
main()
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package main
|
||||
|
||||
// ExampleMain ensures the following will work:
|
||||
// Example_main ensures the following will work:
|
||||
//
|
||||
// go build replace-import.go
|
||||
// ./replace-import
|
||||
func ExampleMain() {
|
||||
func Example_main() {
|
||||
|
||||
main()
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@ package main
|
||||
|
||||
import "os"
|
||||
|
||||
// ExampleMain ensures the following will work:
|
||||
// Example_main ensures the following will work:
|
||||
//
|
||||
// go build cat.go
|
||||
// ./cat ./test.txt
|
||||
func ExampleMain() {
|
||||
func Example_main() {
|
||||
|
||||
// Save the old os.Args and replace with our example input.
|
||||
oldArgs := os.Args
|
||||
|
||||
Reference in New Issue
Block a user