diff --git a/cmd/build/cmd_workflow.go b/cmd/build/cmd_workflow.go index 92239f0..510bc61 100644 --- a/cmd/build/cmd_workflow.go +++ b/cmd/build/cmd_workflow.go @@ -50,7 +50,7 @@ type releaseWorkflowRequestInputs struct { // resolveReleaseWorkflowTargetPath merges the workflow path aliases and the // workflow output aliases into one final target path. // -// inputs := releaseWorkflowRequestInputs{pathInput: "ci/release.yml"} +// inputs := releaseWorkflowRequestInputs{pathInput: "ci/release.yml", outputPathInput: "ci/release.yml"} // path, err := inputs.resolveReleaseWorkflowTargetPath("/tmp/project") func (inputs releaseWorkflowRequestInputs) resolveReleaseWorkflowTargetPath(projectDir string) (string, error) { resolvedWorkflowPath, err := resolveReleaseWorkflowInputPathAliases( diff --git a/pkg/build/workflow.go b/pkg/build/workflow.go index 909042b..5c439e3 100644 --- a/pkg/build/workflow.go +++ b/pkg/build/workflow.go @@ -114,7 +114,7 @@ func ResolveReleaseWorkflowPath(projectDir, outputPath string) string { return outputPath } -// ResolveReleaseWorkflowInputPath resolves the workflow path from the CLI/API +// ResolveReleaseWorkflowInputPath resolves a workflow target from the CLI/API // `path` field and its `output` alias. // // build.ResolveReleaseWorkflowInputPath("/tmp/project", "", "") // /tmp/project/.github/workflows/release.yml @@ -173,9 +173,9 @@ func ResolveReleaseWorkflowInputPathAliases(filesystem io_interface.Medium, proj // ResolveReleaseWorkflowOutputPath resolves the core workflow output aliases. // -// path, err := build.ResolveReleaseWorkflowOutputPath("ci/release.yml", "", "") -// path, err := build.ResolveReleaseWorkflowOutputPath("", "ci/release.yml", "") -// path, err := build.ResolveReleaseWorkflowOutputPath("", "", "ci/release.yml") +// outputPath, err := build.ResolveReleaseWorkflowOutputPath("ci/release.yml", "", "") +// outputPath, err := build.ResolveReleaseWorkflowOutputPath("", "ci/release.yml", "") +// outputPath, err := build.ResolveReleaseWorkflowOutputPath("", "", "ci/release.yml") // // build.ResolveReleaseWorkflowOutputPath("ci/release.yml", "", "") // "ci/release.yml" // build.ResolveReleaseWorkflowOutputPath("", "ci/release.yml", "") // "ci/release.yml" @@ -448,7 +448,7 @@ func resolveReleaseWorkflowInputPath(projectDir, input string, medium io_interfa // resolveReleaseWorkflowInputPathAliasSet resolves a workflow path from a set // of aliases and rejects conflicting values. -func resolveReleaseWorkflowInputPathAliasSet(filesystem io_interface.Medium, projectDir, primaryLabel, primaryInput, secondaryInput, tertiaryInput, quaternaryInput, errorName string) (string, error) { +func resolveReleaseWorkflowInputPathAliasSet(filesystem io_interface.Medium, projectDir, fieldLabel, primaryInput, secondaryInput, tertiaryInput, quaternaryInput, errorName string) (string, error) { values := []string{ cleanWorkflowInput(primaryInput), cleanWorkflowInput(secondaryInput), @@ -469,7 +469,7 @@ func resolveReleaseWorkflowInputPathAliasSet(filesystem io_interface.Medium, pro } if resolved != candidate { - return "", coreerr.E(errorName, primaryLabel+" aliases specify different locations", nil) + return "", coreerr.E(errorName, fieldLabel+" aliases specify different locations", nil) } }