Skip to content

Commit e10de73

Browse files
committed
Add support for any
1 parent 13f87ef commit e10de73

4 files changed

Lines changed: 50 additions & 3 deletions

File tree

‎parser/parser.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ func parseStruct(expr ast.Expr) *Struct {
757757
switch v.Name {
758758
case "bool", "string",
759759
"int", "int8", "int16", "int32", "int64", "uint", "uint8", "uint16", "uint32", "uint64", "uintptr", "byte", "rune",
760-
"float32", "float64", "complex64", "complex128":
760+
"float32", "float64", "complex64", "complex128", "any":
761761
return nil
762762
}
763763

‎testdata/printer.go‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ func (PrintService) PrintOptional(s *string) string {
2626

2727
return *s
2828
}
29+
30+
func (PrintService) PrintAnything(s any) any {
31+
return s
32+
}

‎testdata/testdata/arithsrv-smd.json‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,18 @@
852852
}
853853
}
854854
},
855+
"printer.PrintAnything": {
856+
"description": "",
857+
"parameters": [
858+
{
859+
"name": "s",
860+
"type": "object"
861+
}
862+
],
863+
"returns": {
864+
"type": "object"
865+
}
866+
},
855867
"printer.PrintOptional": {
856868
"description": "",
857869
"parameters": [

‎testdata/testdata_zenrpc.go‎

Lines changed: 33 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)