Skip to content

Commit 98832b5

Browse files
committed
Fix wrong constructor for InputFile
1 parent 94c2321 commit 98832b5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

templates/go/inputFile.go.twig

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ type InputFile struct {
66
Data []byte
77
}
88

9-
func (inp *InputFile) NewInputFile(path string, name string) {
10-
inp.Path = path
11-
inp.Name = name
9+
func NewInputFile(path string, name string) InputFile {
10+
return InputFile{
11+
Name: name,
12+
Path: path,
13+
Data: nil,
14+
}
1215
}

0 commit comments

Comments
 (0)