diff --git a/src/types.go b/src/types.go index 97004ff..324b08d 100644 --- a/src/types.go +++ b/src/types.go @@ -71,3 +71,10 @@ func APIParamTypeDecToString(t *APIParamType) string { ret = ret + t.Typename return ret } + +func APIParamTypeUseRef(t *APIParamType) string { + if t.IsArray || !t.Ispointer { + return "&" + } + return "" +}