File tree 3 files changed +77
-0
lines changed
3 files changed +77
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Binaries for programs and plugins
2
+ bin /
3
+
4
+ # package dependencies file generated by `dep ensure` command
5
+ Gopkg.lock
6
+
7
+ # Test binary, built with `go test -c`
8
+ * .test
9
+
10
+ # Output of the go coverage tool, specifically when used with LiteIDE
11
+ * .out
12
+
13
+ # Dependency directories (remove the comment below to include it)
14
+ vendor /
15
+
16
+ # app log files
17
+ * .log
18
+
19
+ # Editors
20
+ # PyCharm
21
+ .idea
22
+ # VIM
23
+ * ~
24
+ * .swp
25
+ * .swo
26
+ # Visual Studio Code
27
+ .vscode /*
28
+ ! .vscode /settings.json
29
+ ! .vscode /tasks.json
30
+ ! .vscode /launch.json
31
+ ! .vscode /extensions.json
32
+ * .code-workspace
33
+ .history /
34
+
35
+ # Git
36
+ * .orig
Original file line number Diff line number Diff line change
1
+ # Gopkg.toml example
2
+ #
3
+ # Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
4
+ # for detailed Gopkg.toml documentation.
5
+ #
6
+ # required = ["github.com/user/thing/cmd/thing"]
7
+ # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
8
+ #
9
+ # [[constraint]]
10
+ # name = "github.com/user/project"
11
+ # version = "1.0.0"
12
+ #
13
+ # [[constraint]]
14
+ # name = "github.com/user/project2"
15
+ # branch = "dev"
16
+ # source = "github.com/myfork/project2"
17
+ #
18
+ # [[override]]
19
+ # name = "github.com/x/y"
20
+ # version = "2.4.0"
21
+ #
22
+ # [prune]
23
+ # non-go = false
24
+ # go-tests = true
25
+ # unused-packages = true
26
+
27
+
28
+ [[constraint ]]
29
+ name = " github.com/spf13/afero"
30
+ version = " 1.4.1"
31
+
32
+ [[constraint ]]
33
+ name = " github.com/stretchr/testify"
34
+ version = " 1.6.1"
35
+
36
+ [prune ]
37
+ go-tests = true
38
+ unused-packages = true
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ TmpFile Creates a tmp file for us to use when testing
34
34
*/
35
35
func TmpFile (t TestReporter , dir string , content string ) afero.File {
36
36
file , err := afero .TempFile (appFs , dir , "file" )
37
+ defer file .Close ()
37
38
38
39
if err != nil {
39
40
t .Error ("Failed to create the tmpFile: " + file .Name (), err )
@@ -50,6 +51,8 @@ File Creates a specified file for us to use when testing
50
51
*/
51
52
func File (t TestReporter , path string , content string ) afero.File {
52
53
file , err := appFs .OpenFile (path , os .O_RDWR | os .O_CREATE , 0600 )
54
+ defer file .Close ()
55
+
53
56
if err != nil {
54
57
t .Error ("Failed to create the file: " + path , err )
55
58
return nil
You can’t perform that action at this time.
0 commit comments