mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 03:52:41 +08:00
added interface{} test case and fixed
This commit is contained in:
parent
4118f348f5
commit
f5c3907fac
@ -201,6 +201,8 @@ declare global {
|
|||||||
|
|
||||||
func goTypeToJSDocType(input string) string {
|
func goTypeToJSDocType(input string) string {
|
||||||
switch true {
|
switch true {
|
||||||
|
case input == "interface{}":
|
||||||
|
return "any"
|
||||||
case input == "string":
|
case input == "string":
|
||||||
return "string"
|
return "string"
|
||||||
case input == "error":
|
case input == "error":
|
||||||
|
@ -56,6 +56,11 @@ func Test_goTypeToJSDocType(t *testing.T) {
|
|||||||
input: "bool",
|
input: "bool",
|
||||||
want: "boolean",
|
want: "boolean",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "interface{}",
|
||||||
|
input: "interface{}",
|
||||||
|
want: "any",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "[]byte",
|
name: "[]byte",
|
||||||
input: "[]byte",
|
input: "[]byte",
|
||||||
|
Loading…
Reference in New Issue
Block a user