Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// FindGoModuleRoot finds the Go module root directory by searching for `go.mod`
func FindGoModuleRoot(target string) (string, error) {
dir := filepath.Dir(target)
dir := filepath.Clean(target)
for {
if _, err := os.Stat(filepath.Join(dir, "go.mod")); err == nil {
return dir, nil // Found go.mod, return this directory as module root
Expand Down
Loading