-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexample.go
More file actions
38 lines (28 loc) · 936 Bytes
/
example.go
File metadata and controls
38 lines (28 loc) · 936 Bytes
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
35
36
37
38
package tracegen
import (
"context"
foobar "github.com/KazanExpress/tracegen/examples/bar"
"github.com/KazanExpress/tracegen/examples/foo"
)
//go:generate tracegen -source $GOFILE -destination "example_gen.go"
type Example interface {
// A does something important.
// @trace Int64:id, String:text
A(ctx context.Context, id int64, text string) (bool, error)
// B does something important too.
// @trace foo, String:foo.Name
B(ctx context.Context, foo *foo.Foo) foobar.Bar
// C does something important?
// @trace String:foo.Name
C(ctx context.Context, foo *foo.Foo) error
D(ctx context.Context)
// E does something important.
// @trace bar
E(ctx context.Context, bar []foobar.Bar) []foobar.Bar
// F does something important.
// @trace bars
F(ctx context.Context, bars []*foobar.Bar) []*foobar.Bar
// G does something important.
// @trace bars
G(ctx context.Context, bars *[]*foobar.Bar) *[]*foobar.Bar
}