Remove unused reverse source conversions
This commit is contained in:
@@ -237,22 +237,6 @@ func SourceInfoImportSelectionsForFacade(source SourceInfo) []ImportSelectionFor
|
||||
|
||||
// SourceInfoWithImportSelections copies converted root-owned records into
|
||||
// private engine source evidence.
|
||||
func SourceInfoWithImportSelections(source SourceInfo, selections []ImportSelectionForFacade) SourceInfo {
|
||||
if selections == nil {
|
||||
source.importSelections = nil
|
||||
return source
|
||||
}
|
||||
source.importSelections = make([]importSelectionEvidence, len(selections))
|
||||
for index, selection := range selections {
|
||||
source.importSelections[index] = importSelectionEvidence{
|
||||
path: selection.Path.clone(), location: selection.Location,
|
||||
selector: importSelectorFromString(selection.Selector),
|
||||
outcome: importSelectionOutcomeFromString(selection.Outcome),
|
||||
}
|
||||
}
|
||||
return source
|
||||
}
|
||||
|
||||
func importSelectorString(value importSelector) string {
|
||||
switch value {
|
||||
case importSelectorPath:
|
||||
@@ -266,19 +250,6 @@ func importSelectorString(value importSelector) string {
|
||||
}
|
||||
}
|
||||
|
||||
func importSelectorFromString(value string) importSelector {
|
||||
switch value {
|
||||
case "path":
|
||||
return importSelectorPath
|
||||
case "dir":
|
||||
return importSelectorDirectory
|
||||
case "glob":
|
||||
return importSelectorGlob
|
||||
default:
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
func importSelectionOutcomeString(value importSelectionOutcome) string {
|
||||
if value == importSelectionNone {
|
||||
return "none"
|
||||
@@ -286,13 +257,6 @@ func importSelectionOutcomeString(value importSelectionOutcome) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func importSelectionOutcomeFromString(value string) importSelectionOutcome {
|
||||
if value == "none" {
|
||||
return importSelectionNone
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// SourceInfoPlacementModeForFacade converts private placement evidence to its
|
||||
// root-owned numeric representation.
|
||||
func SourceInfoPlacementModeForFacade(source SourceInfo) uint8 {
|
||||
@@ -304,13 +268,6 @@ func SourceInfoDestinationUnresolvedForFacade(source SourceInfo) bool {
|
||||
return source.destinationUnresolved
|
||||
}
|
||||
|
||||
// SourceInfoWithPlacement copies facade-owned source evidence into private fields.
|
||||
func SourceInfoWithPlacement(source SourceInfo, mode uint8, unresolved bool) SourceInfo {
|
||||
source.placementMode = placementMode(mode)
|
||||
source.destinationUnresolved = unresolved
|
||||
return source
|
||||
}
|
||||
|
||||
// SourceVersionCheck is a detached, public-safe record of a source-local
|
||||
// version declaration observed during an enabled load.
|
||||
type SourceVersionCheck struct {
|
||||
|
||||
Reference in New Issue
Block a user