Skip to content

Commit

Permalink
Apply readability changes to localizer
Browse files Browse the repository at this point in the history
  • Loading branch information
annasong20 committed Nov 11, 2022
1 parent 8a6c7d2 commit ad6348f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/internal/localizer/localizer.go
Expand Up @@ -27,15 +27,15 @@ type Localizer struct {
rFactory *resmap.Factory
pLdr *pLdr.Loader

// underlying type is LocLoader
// underlying type is Loader
ldr ifc.Loader

// destination directory in newDir that mirrors ldr's current root.
dst filesys.ConfirmedDir
}

// NewLocalizer is the factory method for Localizer
func NewLocalizer(ldr *LocLoader, validator ifc.Validator, rFactory *resmap.Factory, pLdr *pLdr.Loader) (*Localizer, error) {
func NewLocalizer(ldr *Loader, validator ifc.Validator, rFactory *resmap.Factory, pLdr *pLdr.Loader) (*Localizer, error) {
toDst, err := filepath.Rel(ldr.args.Scope.String(), ldr.Root())
if err != nil {
log.Fatalf("cannot find path from directory %q to %q inside directory: %s", ldr.args.Scope.String(),
Expand Down
2 changes: 1 addition & 1 deletion api/internal/localizer/localizer_test.go
Expand Up @@ -58,7 +58,7 @@ func createLocalizer(t *testing.T, fSys filesys.FileSystem, target string, scope
t.Helper()

// no need to re-test LocLoader
ldr, _, err := NewLocLoader(target, scope, newDir, fSys)
ldr, _, err := NewLoader(target, scope, newDir, fSys)
require.NoError(t, err)
rmFactory := resmap.NewFactory(resource.NewFactory(&hasher.Hasher{}))
lc, err := NewLocalizer(
Expand Down

0 comments on commit ad6348f

Please sign in to comment.