diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-07-29 17:02:04 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-07-30 18:35:36 +1000 |
commit | 7b302d8c298ca2eb7e08d63f993186d25252f97e (patch) | |
tree | ef50114f45816c9dc16cfa6e827cbd74fce38469 /go.mod | |
parent | a1fae4105116775b5c4a0c9c3b01fa822b29cfac (diff) |
Write unit tests with the help of afero
Afero is a package that lets you mock out a filesystem with an in-memory filesystem.
It allows us to easily create the files required for a given test without worrying about
a cleanup step or different tests tripping on eachother when run in parallel.
Later on I'll standardise on using afero over the vanilla os package
Diffstat (limited to 'go.mod')
-rw-r--r-- | go.mod | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -65,8 +65,10 @@ require ( github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/sergi/go-diff v1.1.0 // indirect + github.com/spf13/afero v1.9.5 // indirect github.com/xanzy/ssh-agent v0.2.1 // indirect - golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect + golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect + golang.org/x/exp v0.0.0-20220318154914-8dddf5d87bd8 // indirect golang.org/x/net v0.7.0 // indirect golang.org/x/sys v0.10.0 // indirect golang.org/x/term v0.10.0 // indirect |