Conditions | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | package output |
||
37 | func (w FileWriter) Write(tableName string, content string) error { |
||
38 | 1 | fileName := path.Join(w.path, tableName+FileWriterExtension) |
|
39 | |||
40 | 1 | decorated, err := w.decorate(content) |
|
41 | 1 | if err != nil { |
|
42 | 1 | return err |
|
43 | } |
||
44 | |||
45 | 1 | return ioutil.WriteFile(fileName, []byte(decorated), 0666) |
|
46 | } |
||
59 |