zeromicro / go-zero

A cloud-native Go microservices framework with cli tool for productivity.
https://go-zero.dev
MIT License
29.34k stars 3.96k forks source link

fix the source code directory after the soft link #4425

Closed yangjinheng closed 1 month ago

yangjinheng commented 1 month ago

To solve the problem of the disk full of code, I used soft links to move the directory where the code is saved, but the import path of the code generated by goctl is wrong

The problem occurs in tools/goctl/rpc/generator/mkdir.go SetPbDir()

d.ctx.Dir calculates the absolute path pbDir does not calculate the absolute path strings.TrimPrefix tries to remove d.ctx.Dir from pbDir but does not get a match

yangjinheng commented 1 month ago

help

@kevwan @kesonan @kingxt

Issues-translate-bot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. πŸ‘―πŸ‘­πŸ»πŸ§‘β€πŸ€β€πŸ§‘πŸ‘«πŸ§‘πŸΏβ€πŸ€β€πŸ§‘πŸ»πŸ‘©πŸΎβ€πŸ€β€πŸ‘¨πŸΏπŸ‘¬πŸΏ


help

@kevwan @kesonan @kingxt

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.53%. Comparing base (8690859) to head (1f26ae1). Report is 156 commits behind head on master.

Additional details and impacted files [see 4 files with indirect coverage changes](https://app.codecov.io/gh/zeromicro/go-zero/pull/4425/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zeromicro)
yangjinheng commented 1 month ago

πŸ‘thanks