File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -285,8 +285,14 @@ func (r *Resource) AddProtos(protos []Proto) error {
285285 protoPath := filepath .Join (BasePath , r .clientConn .Target ())
286286 err := os .MkdirAll (protoPath , 0777 )
287287 if os .IsExist (err ) {
288- os .RemoveAll (protoPath )
288+ err = os .RemoveAll (protoPath )
289+ if err != nil {
290+ return err
291+ }
289292 err = os .MkdirAll (protoPath , 0777 )
293+ if err != nil {
294+ return err
295+ }
290296 } else if err != nil {
291297 return err
292298 }
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ func Test_prepareImport(t *testing.T) {
6060 }
6161 for _ , tt := range tests {
6262 t .Run (tt .name , func (t * testing.T ) {
63- if got := prepareImport (tt .args .proto , "" ); ! reflect .DeepEqual (got , tt .want ) {
63+ if got := prepareImport (tt .args .proto ); ! reflect .DeepEqual (got , tt .want ) {
6464 t .Errorf ("prepareImport() = %v, want %v" ,
6565 string (got ),
6666 string (tt .want ))
You can’t perform that action at this time.
0 commit comments