File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed
language/testdata/codefiles Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ func TestWithDetection_NonFileType(t *testing.T) {
124
124
h := opt (func (_ context.Context , hh []heartbeat.Heartbeat ) ([]heartbeat.Result , error ) {
125
125
assert .Equal (t , []heartbeat.Heartbeat {
126
126
{
127
- Entity : "testdata/codefiles/ golang.go" ,
127
+ Entity : "testdata/golang.go" ,
128
128
EntityType : heartbeat .AppType ,
129
129
},
130
130
}, hh )
@@ -137,7 +137,7 @@ func TestWithDetection_NonFileType(t *testing.T) {
137
137
})
138
138
139
139
result , err := h (context .Background (), []heartbeat.Heartbeat {{
140
- Entity : "testdata/codefiles/ golang.go" ,
140
+ Entity : "testdata/golang.go" ,
141
141
EntityType : heartbeat .AppType ,
142
142
}})
143
143
require .NoError (t , err )
Original file line number Diff line number Diff line change
1
+ package main
2
+
3
+ // list every possible way of importing to try and break dependency detection
4
+ // http://learngowith.me/alternate-ways-of-importing-packages/
5
+
6
+ import "fmt"
7
+ import "compress/gzip"
8
+ import "github.com/golang/example/stringutil"
9
+ import (
10
+ "log"
11
+ "os"
12
+ )
13
+ import newname "oldname"
14
+ import . "direct"
15
+ import _ "suppress"
16
+ import (
17
+ "foobar"
18
+ _ "image/gif"
19
+ . "math"
20
+ )
21
+
22
+ func main () {
23
+ fmt .Println ("Hello, World!" )
24
+ }
You can’t perform that action at this time.
0 commit comments