File tree Expand file tree Collapse file tree 2 files changed +16
-15
lines changed Expand file tree Collapse file tree 2 files changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -179,21 +179,6 @@ func (act *action) analyze() {
179
179
}
180
180
}
181
181
182
- // importObjectFact implements Pass.ImportObjectFact.
183
- // Given a non-nil pointer ptr of type *T, where *T satisfies Fact,
184
- // importObjectFact copies the fact value to *ptr.
185
- func (act * action ) importObjectFact (obj types.Object , ptr analysis.Fact ) bool {
186
- if obj == nil {
187
- panic ("nil object" )
188
- }
189
- key := objectFactKey {obj , act .factType (ptr )}
190
- if v , ok := act .objectFacts [key ]; ok {
191
- reflect .ValueOf (ptr ).Elem ().Set (reflect .ValueOf (v ).Elem ())
192
- return true
193
- }
194
- return false
195
- }
196
-
197
182
// importPackageFact implements Pass.ImportPackageFact.
198
183
// Given a non-nil pointer ptr of type *T, where *T satisfies Fact,
199
184
// fact copies the fact value to *ptr.
Original file line number Diff line number Diff line change @@ -14,6 +14,22 @@ import (
14
14
"golang.org/x/tools/go/analysis"
15
15
)
16
16
17
+ // NOTE(ldez) altered: logger; `act.factType`
18
+ // importObjectFact implements Pass.ImportObjectFact.
19
+ // Given a non-nil pointer ptr of type *T, where *T satisfies Fact,
20
+ // importObjectFact copies the fact value to *ptr.
21
+ func (act * action ) importObjectFact (obj types.Object , ptr analysis.Fact ) bool {
22
+ if obj == nil {
23
+ panic ("nil object" )
24
+ }
25
+ key := objectFactKey {obj , act .factType (ptr )}
26
+ if v , ok := act .objectFacts [key ]; ok {
27
+ reflect .ValueOf (ptr ).Elem ().Set (reflect .ValueOf (v ).Elem ())
28
+ return true
29
+ }
30
+ return false
31
+ }
32
+
17
33
// NOTE(ldez) altered: removes code related to `act.pass.ExportPackageFact`; logger; `act.factType`.
18
34
// exportObjectFact implements Pass.ExportObjectFact.
19
35
func (act * action ) exportObjectFact (obj types.Object , fact analysis.Fact ) {
You can’t perform that action at this time.
0 commit comments