Skip to content

Commit

Permalink
fix: path
Browse files Browse the repository at this point in the history
  • Loading branch information
si3nloong committed Nov 13, 2023
1 parent e0aafa5 commit 4e7002a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions codegen/codegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ func Generate(c *config.Config) error {
// If the prefix is ".", mean it's refer to current directory
if srcDir[0] == '.' {
srcDir = fileutil.Getpwd() + srcDir[1:]
} else if srcDir[0] != '/' {
srcDir = filepath.Join(fileutil.Getpwd(), srcDir)
}

// File: examples/testdata/test.go
Expand Down

0 comments on commit 4e7002a

Please sign in to comment.