| 1 |
// Copyright 2022 The Kubernetes Authors. |
| 2 |
// SPDX-License-Identifier: Apache-2.0 |
| 3 |
|
| 4 |
package localizer |
| 5 |
|
| 6 |
import ( |
| 7 |
"sigs.k8s.io/kustomize/api/internal/localizer" |
| 8 |
"sigs.k8s.io/kustomize/kyaml/errors" |
| 9 |
"sigs.k8s.io/kustomize/kyaml/filesys" |
| 10 |
) |
| 11 |
|
| 12 |
// Run executes `kustomize localize` on fSys given the `localize` arguments and |
| 13 |
// returns the path to the created newDir. |
| 14 |
func Run(fSys filesys.FileSystem, target, scope, newDir string) (string, error) { |
| 15 |
dst, err := localizer.Run(target, scope, newDir, fSys) |
| 16 |
return dst, errors.Wrap(err) |
| 17 |
} |