blob: c878b7708ea64a6a22b8590afe5218caf57b28a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// 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
const (
a = iota
b
)
const (
c = 3
d = 4
)
const (
e = iota
f
)
// The example refers to only one of the constants in the iota group, but we
// must keep all of them because of the iota. The second group of constants can
// be trimmed. The third has an iota, but is unused, so it can be eliminated.
func Example() {
_ = b
_ = d
}
// Need two examples to hit the playExample function.
func Example2() {
}
|