Skip to content

Commit

Permalink
clarify relative path helper method args
Browse files Browse the repository at this point in the history
  • Loading branch information
bthaile committed Nov 21, 2023
1 parent 231038a commit 28034bf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/super/flix.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,10 @@ func getTemplate(state *flowkit.State, flixService flixkit.FlixService, flixQuer
return template, nil
}

// GetRelativePath computes the relative path from target to source.
func GetRelativePath(source, target string) (string, error) {
relPath, err := filepath.Rel(filepath.Dir(target), source)
// GetRelativePath computes the relative path from generated file to flix json file.
// This path is used in the binding file to reference the flix json file.
func GetRelativePath(configFile, bindingFile string) (string, error) {
relPath, err := filepath.Rel(filepath.Dir(bindingFile), configFile)
if err != nil {
return "", err
}
Expand Down

0 comments on commit 28034bf

Please sign in to comment.