feat: add copy file to local

This commit is contained in:
ᴍᴏᴏɴD4ʀᴋ
2022-04-11 19:57:40 +08:00
parent 46f2610a0a
commit dc06b1d69b
18 changed files with 83 additions and 258 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ type outPutter struct {
csv bool
}
func NewOutPutter(flag string) *outPutter {
func New(flag string) *outPutter {
o := &outPutter{}
if flag == "json" {
o.json = true
+2 -2
View File
@@ -6,9 +6,9 @@ import (
)
func TestNewOutPutter(t *testing.T) {
out := NewOutPutter("json")
out := New("json")
if out == nil {
t.Error("NewOutPutter() returned nil")
t.Error("New() returned nil")
}
f, err := out.CreateFile("results", "test.json")
if err != nil {