-
Notifications
You must be signed in to change notification settings - Fork 10
/
test_tags_dup_gtrace_stub.go
137 lines (129 loc) · 3.37 KB
/
test_tags_dup_gtrace_stub.go
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
// Code generated by gtrace. DO NOT EDIT.
// +build !gtrace
package test
import (
"bytes"
"context"
)
// Compose returns a new AnotherBuildTagTrace which has functional fields composed
// both from t and x.
func (t AnotherBuildTagTrace) Compose(x AnotherBuildTagTrace) (ret AnotherBuildTagTrace) {
switch {
case t.OnSomethingA == nil:
ret.OnSomethingA = x.OnSomethingA
case x.OnSomethingA == nil:
ret.OnSomethingA = t.OnSomethingA
default:
h1 := t.OnSomethingA
h2 := x.OnSomethingA
ret.OnSomethingA = func() func() {
r1 := h1()
r2 := h2()
switch {
case r1 == nil:
return r2
case r2 == nil:
return r1
default:
return func() {
r1()
r2()
}
}
}
}
switch {
case t.OnSomethingB == nil:
ret.OnSomethingB = x.OnSomethingB
case x.OnSomethingB == nil:
ret.OnSomethingB = t.OnSomethingB
default:
h1 := t.OnSomethingB
h2 := x.OnSomethingB
ret.OnSomethingB = func(i int8, i1 int16) func(int32, int64) {
r1 := h1(i, i1)
r2 := h2(i, i1)
switch {
case r1 == nil:
return r2
case r2 == nil:
return r1
default:
return func(i int32, i1 int64) {
r1(i, i1)
r2(i, i1)
}
}
}
}
switch {
case t.OnSomethingC == nil:
ret.OnSomethingC = x.OnSomethingC
case x.OnSomethingC == nil:
ret.OnSomethingC = t.OnSomethingC
default:
h1 := t.OnSomethingC
h2 := x.OnSomethingC
ret.OnSomethingC = func(t Type) func(Type) {
r1 := h1(t)
r2 := h2(t)
switch {
case r1 == nil:
return r2
case r2 == nil:
return r1
default:
return func(t Type) {
r1(t)
r2(t)
}
}
}
}
return ret
}
type anotherBuildTagTraceContextKey struct{}
// WithAnotherBuildTagTrace returns context which has associated AnotherBuildTagTrace with it.
func WithAnotherBuildTagTrace(ctx context.Context, t AnotherBuildTagTrace) context.Context {
return context.WithValue(ctx,
anotherBuildTagTraceContextKey{},
ContextAnotherBuildTagTrace(ctx).Compose(t),
)
}
// ContextAnotherBuildTagTrace returns AnotherBuildTagTrace associated with ctx.
// If there is no AnotherBuildTagTrace associated with ctx then zero value
// of AnotherBuildTagTrace is returned.
func ContextAnotherBuildTagTrace(ctx context.Context) AnotherBuildTagTrace {
t, _ := ctx.Value(anotherBuildTagTraceContextKey{}).(AnotherBuildTagTrace)
return t
}
func gtraceNoopBdbd803d() {
}
func (AnotherBuildTagTrace) onSomethingA(context.Context) func() {
return gtraceNoopBdbd803d
}
func gtraceNoop86ffa8ac(int32, int64) {
}
func (AnotherBuildTagTrace) onSomethingB(context.Context, int8, int16) func(int32, int64) {
return gtraceNoop86ffa8ac
}
func gtraceNoop8a9c608a(Type) {
}
func (AnotherBuildTagTrace) onSomethingC(context.Context, Type) func(Type) {
return gtraceNoop8a9c608a
}
func gtraceNoopBdbd803d1() {
}
func anotherBuildTagTraceOnSomethingA(context.Context, AnotherBuildTagTrace) func() {
return gtraceNoopBdbd803d1
}
func gtraceNoop86ffa8ac1(int32, int64) {
}
func anotherBuildTagTraceOnSomethingB(context.Context, AnotherBuildTagTrace, int8, int16) func(int32, int64) {
return gtraceNoop86ffa8ac1
}
func gtraceNoop8a9c608a1(Embeded, string, int, bool, error, bytes.Reader) {
}
func anotherBuildTagTraceOnSomethingC(ctx context.Context, t AnotherBuildTagTrace, e Embeded, s string, integer int, boolean bool, e1 error, r bytes.Reader) func(_ Embeded, _ string, integer int, boolean bool, _ error, _ bytes.Reader) {
return gtraceNoop8a9c608a1
}