diff options
Diffstat (limited to 'src/go/doc/testdata/examples/values.go')
-rw-r--r-- | src/go/doc/testdata/examples/values.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/go/doc/testdata/examples/values.go b/src/go/doc/testdata/examples/values.go new file mode 100644 index 0000000..64b0de4 --- /dev/null +++ b/src/go/doc/testdata/examples/values.go @@ -0,0 +1,22 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package foo_test + +// Variable declaration with fewer values than names. + +func f() (int, int) { + return 1, 2 +} + +var a, b = f() + +// Need two examples to hit playExample. + +func ExampleA() { + _ = a +} + +func ExampleB() { +} |