Skip to content

Commit d189af8

Browse files
committed
Rename 'legacy' imports to 'classic' imports
1 parent 4f64254 commit d189af8

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

util/imports.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ type Import interface {
4949
GoImportPath() string // the import path used in .go files
5050
GoGetImportPath() string // the import path used by "go get" command
5151
GoModImportPath() string // the import path used by "go mod edit" command
52-
IsLegacy() bool // an import is "legacy" if it does not have a relative import path
52+
IsClassic() bool // an import is "classic" if it does not have a relative import path
5353
}
5454

5555
type Imports []Import
@@ -100,7 +100,7 @@ func (flogoImport *FlogoImport) GoModImportPath() string {
100100
}
101101
return flogoImport.modulePath + version
102102
}
103-
func (flogoImport *FlogoImport) IsLegacy() bool {
103+
func (flogoImport *FlogoImport) IsClassic() bool {
104104
return flogoImport.relativeImportPath == ""
105105
}
106106

util/mod.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (m *ModDepManager) AddDependency(flogoImport Import) error {
6060
// (meaning it does not separate module path from Go import path):
6161
// 1. remove the import manually ("go mod edit -droprequire") would fail
6262
// 2. try with "go get" instead
63-
if flogoImport.IsLegacy() {
63+
if flogoImport.IsClassic() {
6464
m.RemoveImport(flogoImport)
6565

6666
err = ExecCmd(exec.Command("go", "get", "-u", flogoImport.GoGetImportPath()), m.srcDir)

0 commit comments

Comments
 (0)