mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 00:52:55 +00:00
Simplify the cmd/config ext package
This commit is contained in:
@@ -3,22 +3,8 @@
|
||||
|
||||
package ext
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
// GetOpenAPIFile returns the path to the file containing supplementary OpenAPI definitions.
|
||||
// Maybe be overridden to configure which file to read OpenAPI definitions from.
|
||||
var GetOpenAPIFile = func(args []string) (string, error) {
|
||||
return filepath.Join(args[0], "Krmfile"), nil
|
||||
}
|
||||
|
||||
// OpenAPIFileName returns the name of the file with openAPI definitions
|
||||
// uses OpenAPIFile function to derive it
|
||||
func OpenAPIFileName() (string, error) {
|
||||
openAPIFileName, err := GetOpenAPIFile([]string{"."})
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return openAPIFileName, nil
|
||||
// KRMFileName returns the name of the KRM file. KRM file determines package
|
||||
// boundaries and contains the openapi information for a package.
|
||||
var KRMFileName = func() string {
|
||||
return "Krmfile"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user