mirror of
https://github.com/yannh/kubeconform.git
synced 2026-04-23 11:54:38 +00:00
add a few comments on exported vars
This commit is contained in:
parent
7db0febbd1
commit
d9a6468d09
4 changed files with 8 additions and 3 deletions
|
|
@ -12,6 +12,7 @@ type LocalSchemas struct {
|
|||
schemas map[string]string
|
||||
}
|
||||
|
||||
// NewLocalSchemas creates a new "registry", that will serve schemas from files, given a list of schema filenames
|
||||
func NewLocalSchemas(schemaFiles []string) (*LocalSchemas, error) {
|
||||
schemas := &LocalSchemas{
|
||||
schemas: map[string]string{},
|
||||
|
|
@ -46,6 +47,7 @@ func NewLocalSchemas(schemaFiles []string) (*LocalSchemas, error) {
|
|||
return schemas, nil
|
||||
}
|
||||
|
||||
// DownloadSchema retrieves the schema from a file for the resource
|
||||
func (r LocalSchemas) DownloadSchema(resourceKind, resourceAPIVersion, k8sVersion string) ([]byte, error) {
|
||||
schemaFile, ok := r.schemas[resourceKind]
|
||||
if !ok {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue