GoPLS Viewer

Home|gopls/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
7package main
8
9/*
10#define HELLO 1
11*/
12import "C"
13
14import "fmt"
15
16type Cgo uint32
17
18const (
19    // MustScanSubDirs indicates that events were coalesced hierarchically.
20    MustScanSubDirs Cgo = 1 << iota
21)
22
23func main() {
24    _ = C.HELLO
25    ck(MustScanSubDirs"MustScanSubDirs")
26}
27
28func ck(day Cgostr string) {
29    if fmt.Sprint(day) != str {
30        panic("cgo.go: " + str)
31    }
32}
33
MembersX
fmt
Cgo
MustScanSubDirs
main
ck
ck.day
ck.str
C
Members
X