@@ -36,7 +36,7 @@ func TestDocSet_WriteOutputs(t *testing.T) {
36
36
name : "write the doc sets to outputs" ,
37
37
args : args {
38
38
cfg : config.Output {
39
- Path : t .TempDir (),
39
+ Paths : [] string { t .TempDir ()} ,
40
40
},
41
41
},
42
42
docs : DocSet {
@@ -47,10 +47,10 @@ func TestDocSet_WriteOutputs(t *testing.T) {
47
47
},
48
48
assert : func (t * testing.T , args args ) {
49
49
t .Helper ()
50
- files , err := filepath .Glob (filepath .Join (args .cfg .Path , "*" ))
50
+ files , err := filepath .Glob (filepath .Join (args .cfg .Paths [ 0 ] , "*" ))
51
51
c .Assert (err , qt .IsNil )
52
52
c .Assert (files , qt .HasLen , 2 )
53
- goEmbedContents , err := os .ReadFile (path .Join (args .cfg .Path , "embed.go" ))
53
+ goEmbedContents , err := os .ReadFile (path .Join (args .cfg .Paths [ 0 ] , "embed.go" ))
54
54
c .Assert (err , qt .IsNil )
55
55
c .Assert (string (goEmbedContents ), qt .Contains , "2024-01-01" )
56
56
},
@@ -59,7 +59,7 @@ func TestDocSet_WriteOutputs(t *testing.T) {
59
59
name : "clears dir if appendOutputFiles is false" ,
60
60
args : args {
61
61
cfg : config.Output {
62
- Path : t .TempDir (),
62
+ Paths : [] string { t .TempDir ()} ,
63
63
},
64
64
appendOutputFiles : false ,
65
65
},
@@ -71,15 +71,15 @@ func TestDocSet_WriteOutputs(t *testing.T) {
71
71
},
72
72
setup : func (t * testing.T , args args ) {
73
73
t .Helper ()
74
- err = os .WriteFile (path .Join (args .cfg .Path , "existing-file" ), []byte ("existing" ), 0644 )
74
+ err = os .WriteFile (path .Join (args .cfg .Paths [ 0 ] , "existing-file" ), []byte ("existing" ), 0644 )
75
75
c .Assert (err , qt .IsNil )
76
76
},
77
77
assert : func (t * testing.T , args args ) {
78
78
t .Helper ()
79
- files , err := filepath .Glob (filepath .Join (args .cfg .Path , "*" ))
79
+ files , err := filepath .Glob (filepath .Join (args .cfg .Paths [ 0 ] , "*" ))
80
80
c .Assert (err , qt .IsNil )
81
81
c .Assert (files , qt .HasLen , 2 )
82
- goEmbedContents , err := os .ReadFile (path .Join (args .cfg .Path , "embed.go" ))
82
+ goEmbedContents , err := os .ReadFile (path .Join (args .cfg .Paths [ 0 ] , "embed.go" ))
83
83
c .Assert (err , qt .IsNil )
84
84
c .Assert (string (goEmbedContents ), qt .Contains , "2024-01-01" )
85
85
},
@@ -89,7 +89,7 @@ func TestDocSet_WriteOutputs(t *testing.T) {
89
89
name : "merges files if appendOutputFiles is true, embeds existing files" ,
90
90
args : args {
91
91
cfg : config.Output {
92
- Path : t .TempDir (),
92
+ Paths : [] string { t .TempDir ()} ,
93
93
},
94
94
appendOutputFiles : true ,
95
95
},
@@ -101,19 +101,19 @@ func TestDocSet_WriteOutputs(t *testing.T) {
101
101
},
102
102
setup : func (t * testing.T , args args ) {
103
103
t .Helper ()
104
- err = os .WriteFile (path .Join (args .cfg .Path , "2024-02-01" ), []byte ("existing" ), 0644 )
104
+ err = os .WriteFile (path .Join (args .cfg .Paths [ 0 ] , "2024-02-01" ), []byte ("existing" ), 0644 )
105
105
c .Assert (err , qt .IsNil )
106
- err = os .WriteFile (path .Join (args .cfg .Path , "2024-02-02" ), []byte ("existing" ), 0644 )
106
+ err = os .WriteFile (path .Join (args .cfg .Paths [ 0 ] , "2024-02-02" ), []byte ("existing" ), 0644 )
107
107
c .Assert (err , qt .IsNil )
108
- err = os .WriteFile (path .Join (args .cfg .Path , "2024-02-03" ), []byte ("existing" ), 0644 )
108
+ err = os .WriteFile (path .Join (args .cfg .Paths [ 0 ] , "2024-02-03" ), []byte ("existing" ), 0644 )
109
109
c .Assert (err , qt .IsNil )
110
110
},
111
111
assert : func (t * testing.T , args args ) {
112
112
t .Helper ()
113
- files , err := filepath .Glob (filepath .Join (args .cfg .Path , "*" ))
113
+ files , err := filepath .Glob (filepath .Join (args .cfg .Paths [ 0 ] , "*" ))
114
114
c .Assert (err , qt .IsNil )
115
115
c .Assert (files , qt .HasLen , 2 + 3 )
116
- goEmbedContents , err := os .ReadFile (path .Join (args .cfg .Path , "embed.go" ))
116
+ goEmbedContents , err := os .ReadFile (path .Join (args .cfg .Paths [ 0 ] , "embed.go" ))
117
117
c .Assert (err , qt .IsNil )
118
118
c .Assert (string (goEmbedContents ), qt .Contains , "2024-01-01" )
119
119
c .Assert (string (goEmbedContents ), qt .Contains , "2024-02-01" )
0 commit comments