Skip to content

Commit

Permalink
Fix array and pointer bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Kujtim committed Nov 19, 2017
1 parent 97dcb89 commit 219c308
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions generator/generate_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ func (g *generateServiceEndpoints) generateEndpointsClientMethods() {
tp := p.Type
ts := strings.Split(tp, ".")
if len(ts) == 1 {
if tp[:1] == strings.ToUpper(tp[:1]) {
if tp[:1] == strings.ToUpper(tp[:1]) && tp[0] != '[' && tp[0] != '*' {
// If the type of the parameter is not `something.MyType` and it starts with an uppercase
// than the type was defined inside the service package.
tp = "service." + tp
Expand Down Expand Up @@ -637,7 +637,7 @@ func (g *generateServiceEndpoints) generateEndpointsClientMethods() {
tp := p.Type
ts := strings.Split(tp, ".")
if len(ts) == 1 {
if tp[:1] == strings.ToUpper(tp[:1]) {
if tp[:1] == strings.ToUpper(tp[:1]) && tp[0] != '[' && tp[0] != '*' {
// If the type of the parameter is not `something.MyType` and it starts with an uppercase
// than the type was defined inside the service package.
tp = "service." + tp
Expand Down Expand Up @@ -707,7 +707,7 @@ func (g *generateServiceEndpoints) generateMethodEndpoint() (err error) {
tp := p.Type
ts := strings.Split(tp, ".")
if len(ts) == 1 {
if tp[:1] == strings.ToUpper(tp[:1]) {
if tp[:1] == strings.ToUpper(tp[:1]) && tp[0] != '[' && tp[0] != '*' {
// If the type of the parameter is not `something.MyType` and it starts with an uppercase
// than the type was defined inside the service package.
tp = "service." + tp
Expand Down Expand Up @@ -738,7 +738,7 @@ func (g *generateServiceEndpoints) generateMethodEndpoint() (err error) {
tp := p.Type
ts := strings.Split(tp, ".")
if len(ts) == 1 {
if tp[:1] == strings.ToUpper(tp[:1]) {
if tp[:1] == strings.ToUpper(tp[:1]) && tp[0] != '[' && tp[0] != '*' {
// If the type of the parameter is not `something.MyType` and it starts with an uppercase
// than the type was defined inside the service package.
tp = "service." + tp
Expand Down

0 comments on commit 219c308

Please sign in to comment.