Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / tools@v0.0.0-20201028153306-37f0764111ff / cmd / stringer / testdata / cgo.go
1 // Copyright 2014 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Import "C" shouldn't be imported.
6
7 package main
8
9 /*
10 #define HELLO 1
11 */
12 import "C"
13
14 import "fmt"
15
16 type Cgo uint32
17
18 const (
19         // MustScanSubDirs indicates that events were coalesced hierarchically.
20         MustScanSubDirs Cgo = 1 << iota
21 )
22
23 func main() {
24         _ = C.HELLO
25         ck(MustScanSubDirs, "MustScanSubDirs")
26 }
27
28 func ck(day Cgo, str string) {
29         if fmt.Sprint(day) != str {
30                 panic("cgo.go: " + str)
31         }
32 }