From 6aefdd58a1f184f7e0592bc83ec0b6684660221b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paulo=20Sima=CC=83o?= Date: Sun, 13 Dec 2020 09:23:36 -0300 Subject: [PATCH] fix cli dec of array --- src/types.go | 7 +++++++ 1 file changed, 7 insertions(+) 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 "" +}