Skip to content

Commit

Permalink
fix the source code directory after the soft link
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yangjinheng authored Oct 16, 2024
1 parent e756766 commit 3c13249
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/goctl/rpc/generator/genpb.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"strings"

"github.com/zeromicro/go-zero/tools/goctl/rpc/execx"
"github.com/zeromicro/go-zero/tools/goctl/util/pathx"
)

// GenPb generates the pb.go file, which is a layer of packaging for protoc to generate gprc,
Expand Down

0 comments on commit 3c13249

Please sign in to comment.