Skip to content

Commit 250e615

Browse files
committed
Update templates
1 parent 632438e commit 250e615

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/SDK/Language/Go.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ public function getTypeName(array $parameter): string
119119
case self::TYPE_NUMBER:
120120
return 'float64';
121121
case self::TYPE_FILE:
122+
return 'InputFile';
122123
case self::TYPE_STRING:
123124
return 'string';
124125
case self::TYPE_BOOLEAN:
@@ -215,7 +216,7 @@ public function getParamExample(array $param): string
215216
$output .= '[]';
216217
break;
217218
case self::TYPE_FILE:
218-
$output .= "file";
219+
$output .= 'NewInputFile("/path/to/file.png", "file.png")';
219220
break;
220221
}
221222
} else {

templates/go/inputFile.go.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ type InputFile struct {
66
Data []byte
77
}
88

9-
func (inp *InputFile) FromPath(path string, name string) {
9+
func (inp *InputFile) NewInputFile(path string, name string) {
1010
inp.Path = path
1111
inp.Name = name
1212
}

0 commit comments

Comments
 (0)