Skip to content

Commit

Permalink
Fix generator import path
Browse files Browse the repository at this point in the history
  • Loading branch information
nlowe committed Dec 30, 2019
1 parent 2e19779 commit 02f3835
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/pkg_path.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
)

func PkgPath(day int) (string, error) {
_, filename, _, ok := runtime.Caller(1)
_, filename, _, ok := runtime.Caller(0)
if !ok {
return "", fmt.Errorf("failed to generate package path")
}

return filepath.Join(filepath.Dir(filepath.Dir(filename)), fmt.Sprintf("day%d", day)), nil
return filepath.Join(filepath.Dir(filepath.Dir(filename)), "challenge", fmt.Sprintf("day%d", day)), nil
}

0 comments on commit 02f3835

Please sign in to comment.