go-zero icon indicating copy to clipboard operation
go-zero copied to clipboard

When use rpc multipule flag All clients use one client go package name

Open LeeDF opened this issue 2 years ago • 3 comments
trafficstars

proto is

  service helloService {
    rpc echo (echoRequest) returns (echoResponse);
  }
  service boostHelloService {
    rpc echo2 (echoRequest2) returns (echoResponse2);
  }   

gen with --multipule

the client dir tree is

client
├── boosthelloservice
│   └── boosthelloservice.go
└── helloservice
    └── helloservice.go

and all packagename is client

when call code like this will not support

package main

import (
	client "awesome-zero-multi/client/helloservice"
)

func main() {
	client.NewBoostHelloService()
	client.NewHelloService()
}

only code like this,but this code is not very good

package main

import (
	boostclient "awesome-zero-multi/client/boosthelloservice"
	client "awesome-zero-multi/client/helloservice"
)

func main() {
	boostclient.NewBoostHelloService()
	client.NewHelloService()
}

Environments (please complete the following information):

  • OS: mac
  • go-zero version [e.g. 1.5.0]
  • goctl version [e.g. 1.5.5, optional]

I recommend directory name for go package name

LeeDF avatar Apr 07 '23 10:04 LeeDF

@anqiansong PTAL.

kevwan avatar Apr 07 '23 12:04 kevwan

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@Anxi sends PTA l.

Issues-translate-bot avatar Apr 07 '23 12:04 Issues-translate-bot

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Apr 07 '24 01:04 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Jul 08 '24 01:07 github-actions[bot]