Migration Playbook: Legacy Layers/Parameters API to Schema/Fields/Values/Sources

Exhaustive, no-compat playbook for migrating Glazed code from the legacy layers/parameters API to the schema/fields/values/sources API.

Sections

Terminology & Glossary
πŸ“– Documentation
Navigation
74 sectionsv0.1
πŸ“„ Migration Playbook: Legacy Layers/Parameters API to Schema/Fields/Values/Sources β€” glaze help migrating-to-facade-packages
migrating-to-facade-packages

Migration Playbook: Legacy Layers/Parameters API to Schema/Fields/Values/Sources

Exhaustive, no-compat playbook for migrating Glazed code from the legacy layers/parameters API to the schema/fields/values/sources API.

Tutorialtutorialmigrationapi-designschemavaluessourcescommands

Overview

This is a breaking migration. The legacy packages (layers, parameters, middlewares, parsed layers) and their alias shims have been removed. You must update imports, type names, and call sites to the new API (schema, fields, values, sources).

This playbook is intentionally exhaustive. It is designed to be a systematic, error-resistant checklist that you can follow in large codebases.

Terminology map (conceptual)

  • Layer -> Section
  • Parameter -> Field
  • ParsedLayer -> SectionValues
  • ParsedLayers -> Values
  • Middlewares -> Sources (resolver chain)

Quick triage (first pass)

  1. Update imports (see mapping below).
  2. Fix compile errors in this order:
    • Command description types
    • Schema/Section constructors
    • Field definition constructors
    • Values decoding
    • Sources (middleware chain)
  3. Run go test ./... and fix remaining errors.

Package and import mapping

Old -> New

  • github.com/go-go-golems/glazed/pkg/cmds/layers -> github.com/go-go-golems/glazed/pkg/cmds/schema
  • github.com/go-go-golems/glazed/pkg/cmds/parameters -> github.com/go-go-golems/glazed/pkg/cmds/fields
  • github.com/go-go-golems/glazed/pkg/cmds/middlewares -> github.com/go-go-golems/glazed/pkg/cmds/sources
  • github.com/go-go-golems/glazed/pkg/cmds/parsedlayers (or layers parsed types) -> github.com/go-go-golems/glazed/pkg/cmds/values

Step-by-step migration

Step 1: Command description API

Old:

  • cmds.CommandDefinition, cmds.NewCommandDefinition
  • cmds.CommandDefinitionOption
  • cmds.CommandDescription.Layers / WithLayers...

New:

  • cmds.CommandDescription, cmds.NewCommandDescription
  • cmds.CommandDescriptionOption
  • CommandDescription.Schema and WithSchema, WithSections, WithSectionsMap, SetSections

Example:

// Old
cmd := cmds.NewCommandDefinition("demo",
    cmds.WithShort("Demo"),
    cmds.WithLayersList(demoLayer),
)

// New
cmd := cmds.NewCommandDescription("demo",
    cmds.WithShort("Demo"),
    cmds.WithSections(demoSection),
)

Step 2: Schema and section construction

Old (layers):

  • layers.ParameterLayer -> schema.Section
  • layers.ParameterLayerImpl -> schema.SectionImpl
  • layers.ParameterLayers -> schema.Schema
  • layers.NewParameterLayer -> schema.NewSection
  • layers.NewParameterLayers -> schema.NewSchema
  • AddLayerToCobraCommand -> AddSectionToCobraCommand

New (schema):

section, _ := schema.NewSection("demo", "Demo",
    schema.WithPrefix("demo-"),
    schema.WithFields(
        fields.New("api-key", fields.TypeString),
    ),
)

schema_ := schema.NewSchema(schema.WithSections(section))

Section interface highlights:

  • AddFields(...*fields.Definition)
  • GetDefinitions() *fields.Definitions
  • InitializeDefaultsFromStruct(s any)
  • InitializeDefaultsFromFields(map[string]any)
  • InitializeStructFromFieldDefaults(s any)
  • AddSectionToCobraCommand(cmd *cobra.Command)

Step 3: Field definitions and types

Old (parameters):

  • ParameterDefinition -> fields.Definition
  • ParameterDefinitions -> fields.Definitions
  • ParameterType -> fields.Type
  • ParsedParameter -> fields.FieldValue
  • ParsedParameters -> fields.FieldValues
  • parameters.NewParameterDefinition -> fields.New

New (fields):

field := fields.New("limit", fields.TypeInteger, fields.WithDefault(10))

Step 4: Values (parsed results)

Old:

  • layers.ParsedLayer -> values.SectionValues
  • layers.ParsedLayers -> values.Values
  • parsedLayers.InitializeStruct(...) -> values.Values.DecodeSectionInto(...)

New:

vals := values.New()
// ... populate with sources
settings := &MySettings{}
if err := vals.DecodeSectionInto(schema.DefaultSlug, settings); err != nil {
    return err
}

Step 5: Sources (middleware chain)

Old (middlewares):

  • middlewares.ParseFromCobraCommand -> sources.FromCobra
  • middlewares.GatherArguments -> sources.FromArgs
  • middlewares.UpdateFromEnv -> sources.FromEnv
  • middlewares.SetFromDefaults -> sources.FromDefaults
  • middlewares.LoadParametersFromFile(s) -> sources.FromFile / sources.FromFiles
  • middlewares.UpdateFromMap -> sources.FromMap / sources.FromMapFirst
  • middlewares.ExecuteMiddlewares -> sources.Execute
  • fields.WithParseStepSource -> sources.WithSource
  • middlewares.WrapWithWhitelistedLayers -> sources.WrapWithWhitelistedSections
  • middlewares.WrapWithWhitelistedLayerParameters -> sources.WrapWithWhitelistedSectionFields
  • middlewares.BlacklistLayers -> sources.BlacklistSections
  • middlewares.BlacklistLayerParameters -> sources.BlacklistSectionFields
  • middlewares.UpdateFromMapAsDefaultFirst -> sources.FromMapAsDefaultFirst

New:

vals := values.New()
err := sources.Execute(schema_, vals,
    sources.FromCobra(cmd, sources.WithSource("flags")),
    sources.FromEnv("MYAPP", sources.WithSource("env")),
    sources.FromFile("config.yaml", sources.WithParseOptions(sources.WithSource("config"))),
    sources.FromDefaults(sources.WithSource(sources.SourceDefaults)),
)

Signature change to keep in mind:

// Old
middlewares.ExecuteMiddlewares(description.Layers, parsedLayers, middlewares_...)

// New
sources.Execute(description.Schema.Clone(), parsedValues, middlewares_...)

Step 5.5: YAML command schema key rename

If you load commands from YAML, replace layers: with sections:. The legacy layers: key no longer matches the new schema API.

# Old
layers:
  - slug: default
    name: Default
    flags:
      - name: limit
        type: int

# New
sections:
  - slug: default
    name: Default
    flags:
      - name: limit
        type: int

Step 6: Settings sections

Old:

  • settings.NewGlazedLayer -> settings.NewGlazedSection
  • logging.LoggingLayer -> logging.LoggingSection
  • AddLoggingLayerToRootCommand -> AddLoggingSectionToRootCommand

New:

glazedSection, _ := settings.NewGlazedSection()
loggingSection, _ := logging.NewLoggingSection("myapp")

Step 7: Config mapping and pattern mappers

Old:

  • TargetLayer -> TargetSection
  • TargetParameter -> TargetField
  • WithValuesForLayers -> WithValuesForSections

Update any config mapping or pattern rules to refer to sections/fields explicitly.

Step 8: Struct tags

Only glazed:"..." is supported. Remove legacy aliases if present (for example, glazed.parameter:"...").

Example:

// Old
type Settings struct {
    Host string `glazed.parameter:"host"`
}

// New
type Settings struct {
    Host string `glazed:"host"`
}

Step 8b: YAML field keys

If you define fields via YAML, the short flag key is now shortFlag (not shorthand).

Example:

flags:
  - name: host
    type: string
    help: Database host
    shortFlag: H

Step 9: Example and file renames

If you reference example paths or files in docs/scripts:

  • cmd/examples/parameter-types -> cmd/examples/field-types
  • misc/json-parameters-from-json.json -> misc/json-fields-from-json.json

Step 10: Validation

  • rg -n -i "layer|parameter" . (exclude ttmp/ if you keep historical notes)
  • gofmt -w <changed files>
  • go test ./...

Common compile errors and fixes

ErrorCauseFix
undefined: cmds.NewCommandDefinitionAlias removedUse cmds.NewCommandDescription
undefined: layers.ParameterLayerOld package removedUse schema.Section
parsedLayers.InitializeStruct missingMethod removedUse Values.DecodeSectionInto
middlewares.ExecuteMiddlewares missingPackage removedUse sources.Execute
undefined: cli.BuildCobraCommandFromBareCommandHelper removedUse cli.BuildCobraCommand
undefined: logging.AddLoggingLayerToRootCommandRenamedUse logging.AddLoggingSectionToRootCommand

Appendices

Appendix A: Symbol rename map (AST tool YAML)

  • github.com/go-go-golems/glazed/pkg/cmds/sources: WhitelistLayersHandler -> WhitelistSectionsHandler
  • github.com/go-go-golems/glazed/pkg/cmds/sources: WhitelistLayerParametersHandler -> WhitelistSectionFieldsHandler
  • github.com/go-go-golems/glazed/pkg/cmds/sources: WhitelistLayers -> WhitelistSections
  • github.com/go-go-golems/glazed/pkg/cmds/sources: WhitelistLayersFirst -> WhitelistSectionsFirst
  • github.com/go-go-golems/glazed/pkg/cmds/sources: WhitelistLayerParameters -> WhitelistSectionFields
  • github.com/go-go-golems/glazed/pkg/cmds/sources: WhitelistLayerParametersFirst -> WhitelistSectionFieldsFirst
  • github.com/go-go-golems/glazed/pkg/cmds/sources: BlacklistLayersHandler -> BlacklistSectionsHandler
  • github.com/go-go-golems/glazed/pkg/cmds/sources: BlacklistLayerParametersHandler -> BlacklistSectionFieldsHandler
  • github.com/go-go-golems/glazed/pkg/cmds/sources: BlacklistLayers -> BlacklistSections
  • github.com/go-go-golems/glazed/pkg/cmds/sources: BlacklistLayersFirst -> BlacklistSectionsFirst
  • github.com/go-go-golems/glazed/pkg/cmds/sources: BlacklistLayerParameters -> BlacklistSectionFields
  • github.com/go-go-golems/glazed/pkg/cmds/sources: BlacklistLayerParametersFirst -> BlacklistSectionFieldsFirst
  • github.com/go-go-golems/glazed/pkg/cmds/sources: WrapWithLayerModifyingHandler -> WrapWithSectionModifyingHandler
  • github.com/go-go-golems/glazed/pkg/cmds/sources: WrapWithWhitelistedLayers -> WrapWithWhitelistedSections
  • github.com/go-go-golems/glazed/pkg/cmds/sources: WrapWithWhitelistedParameterLayers -> WrapWithWhitelistedSectionFields
  • github.com/go-go-golems/glazed/pkg/cmds/sources: WrapWithBlacklistedLayers -> WrapWithBlacklistedSections
  • github.com/go-go-golems/glazed/pkg/cmds/sources: WrapWithBlacklistedParameterLayers -> WrapWithBlacklistedSectionFields
  • github.com/go-go-golems/glazed/pkg/cmds/sources: LoadParametersFromResolvedFilesForCobra -> LoadFieldsFromResolvedFilesForCobra
  • github.com/go-go-golems/glazed/pkg/cmds/sources: readConfigFileToLayerMap -> readConfigFileToSectionMap
  • github.com/go-go-golems/glazed/pkg/cmds/sources: layers_-> schema_
  • github.com/go-go-golems/glazed/pkg/cmds/sources: parsedLayers -> parsedValues
  • github.com/go-go-golems/glazed/pkg/cmds/sources: layer -> section
  • github.com/go-go-golems/glazed/pkg/cmds/sources: parsedLayer -> sectionValues
  • github.com/go-go-golems/glazed/pkg/cmds/sources: layerPrefix -> sectionPrefix
  • github.com/go-go-golems/glazed/pkg/cmds/helpers: TestParameterLayer -> TestSection
  • github.com/go-go-golems/glazed/pkg/cmds/helpers: TestParsedParameter -> TestParsedField
  • github.com/go-go-golems/glazed/pkg/cmds/helpers: TestExpectedLayer -> TestExpectedSection
  • github.com/go-go-golems/glazed/pkg/cmds/helpers: TestWhitelistLayers -> TestWhitelistSections
  • github.com/go-go-golems/glazed/pkg/cmds/helpers: TestWhitelistLayersFirst -> TestWhitelistSectionsFirst
  • github.com/go-go-golems/glazed/pkg/cmds/helpers: TestWhitelistLayerParameters -> TestWhitelistSectionFields
  • github.com/go-go-golems/glazed/pkg/cmds/helpers: TestWhitelistLayerParametersFirst -> TestWhitelistSectionFieldsFirst
  • github.com/go-go-golems/glazed/pkg/cmds/helpers: TestBlacklistLayers -> TestBlacklistSections
  • github.com/go-go-golems/glazed/pkg/cmds/helpers: TestBlacklistLayersFirst -> TestBlacklistSectionsFirst
  • github.com/go-go-golems/glazed/pkg/cmds/helpers: TestBlacklistLayerParameters -> TestBlacklistSectionFields
  • github.com/go-go-golems/glazed/pkg/cmds/helpers: TestBlacklistLayerParametersFirst -> TestBlacklistSectionFieldsFirst
  • github.com/go-go-golems/glazed/pkg/cmds/helpers: NewTestParameterLayer -> NewTestSection
  • github.com/go-go-golems/glazed/pkg/cmds/helpers: NewTestParameterLayers -> NewTestSchema
  • github.com/go-go-golems/glazed/pkg/cmds/schema: AppendLayers -> AppendSections
  • github.com/go-go-golems/glazed/pkg/cmds/schema: PrependLayers -> PrependSections
  • github.com/go-go-golems/glazed/pkg/cmds/schema: ParseLayerFromCobraCommand -> ParseSectionFromCobraCommand
  • github.com/go-go-golems/glazed/pkg/cmds/schema: InitializeDefaultsFromParameters -> InitializeDefaultsFromFields
  • github.com/go-go-golems/glazed/pkg/cmds/schema: InitializeStructFromParameterDefaults -> InitializeStructFromFieldDefaults
  • github.com/go-go-golems/glazed/pkg/cmds/schema: createParameterLayer -> createSection
  • github.com/go-go-golems/glazed/pkg/cmds/schema: createSimpleParameterLayer -> createSimpleSection
  • github.com/go-go-golems/glazed/pkg/cmds/schema: TestNewParameterLayers -> TestNewSchema
  • github.com/go-go-golems/glazed/pkg/cmds/schema: TestParameterLayersSubset -> TestSchemaSubset
  • github.com/go-go-golems/glazed/pkg/cmds/schema: TestParameterLayersForEach -> TestSchemaForEach
  • github.com/go-go-golems/glazed/pkg/cmds/schema: TestParameterLayersForEachE -> TestSchemaForEachE
  • github.com/go-go-golems/glazed/pkg/cmds/schema: TestParameterLayersAppendLayers -> TestSchemaAppendSections
  • github.com/go-go-golems/glazed/pkg/cmds/schema: TestParameterLayersPrependLayers -> TestSchemaPrependSections
  • github.com/go-go-golems/glazed/pkg/cmds/schema: TestParameterLayersMerge -> TestSchemaMerge
  • github.com/go-go-golems/glazed/pkg/cmds/schema: TestParameterLayersAsList -> TestSchemaAsList
  • github.com/go-go-golems/glazed/pkg/cmds/schema: TestParameterLayersClone -> TestSchemaClone
  • github.com/go-go-golems/glazed/pkg/cmds/schema: TestParameterLayersGetAllDefinitions -> TestSchemaGetAllDefinitions
  • github.com/go-go-golems/glazed/pkg/cmds/schema: TestParameterLayersWithLayers -> TestSchemaWithSections
  • github.com/go-go-golems/glazed/pkg/cmds/schema: TestParameterLayersWithDuplicateSlugs -> TestSchemaWithDuplicateSlugs
  • github.com/go-go-golems/glazed/pkg/cmds/schema: TestParameterLayersSubsetWithNonExistentLayers -> TestSchemaSubsetWithMissingSections
  • github.com/go-go-golems/glazed/pkg/cmds/schema: TestParameterLayersMergeWithOverlappingLayers -> TestSchemaMergeWithOverlappingSections
  • github.com/go-go-golems/glazed/pkg/cmds/schema: TestParameterLayersWithLargeNumberOfLayers -> TestSchemaWithLargeNumberOfSections
  • github.com/go-go-golems/glazed/pkg/cmds/schema: TestParameterLayersWithUnicodeLayerNames -> TestSchemaWithUnicodeSectionNames
  • github.com/go-go-golems/glazed/pkg/cmds/schema: ChildLayers -> ChildSections
  • github.com/go-go-golems/glazed/pkg/cmds/sources_test: wrapWithRestrictedLayersTestsYAML -> wrapWithRestrictedSectionsTestsYAML
  • github.com/go-go-golems/glazed/pkg/cmds/sources_test: wrapWithRestrictedLayersTest -> wrapWithRestrictedSectionsTest
  • github.com/go-go-golems/glazed/pkg/cmds/sources_test: TestWrapWithRestrictedLayers -> TestWrapWithRestrictedSections
  • github.com/go-go-golems/glazed/pkg/settings: GlazedParameterLayers -> GlazedSection
  • github.com/go-go-golems/glazed/pkg/settings: GlazeParameterLayerOption -> GlazeSectionOption
  • github.com/go-go-golems/glazed/pkg/settings: NewGlazedParameterLayers -> NewGlazedSection
  • github.com/go-go-golems/glazed/pkg/settings: FieldsFiltersParameterLayer -> FieldsFiltersSection
  • github.com/go-go-golems/glazed/pkg/settings: OutputParameterLayer -> OutputSection
  • github.com/go-go-golems/glazed/pkg/settings: RenameParameterLayer -> RenameSection
  • github.com/go-go-golems/glazed/pkg/settings: ReplaceParameterLayer -> ReplaceSection
  • github.com/go-go-golems/glazed/pkg/settings: SelectParameterLayer -> SelectSection
  • github.com/go-go-golems/glazed/pkg/settings: TemplateParameterLayer -> TemplateSection
  • github.com/go-go-golems/glazed/pkg/settings: JqParameterLayer -> JqSection
  • github.com/go-go-golems/glazed/pkg/settings: SortParameterLayer -> SortSection
  • github.com/go-go-golems/glazed/pkg/settings: SkipLimitParameterLayer -> SkipLimitSection
  • github.com/go-go-golems/glazed/pkg/settings: NewFieldsFiltersParameterLayer -> NewFieldsFiltersSection
  • github.com/go-go-golems/glazed/pkg/settings: NewOutputParameterLayer -> NewOutputSection
  • github.com/go-go-golems/glazed/pkg/settings: NewRenameParameterLayer -> NewRenameSection
  • github.com/go-go-golems/glazed/pkg/settings: NewReplaceParameterLayer -> NewReplaceSection
  • github.com/go-go-golems/glazed/pkg/settings: NewSelectParameterLayer -> NewSelectSection
  • github.com/go-go-golems/glazed/pkg/settings: NewTemplateParameterLayer -> NewTemplateSection
  • github.com/go-go-golems/glazed/pkg/settings: NewJqParameterLayer -> NewJqSection
  • github.com/go-go-golems/glazed/pkg/settings: NewSortParameterLayer -> NewSortSection
  • github.com/go-go-golems/glazed/pkg/settings: NewSkipLimitParameterLayer -> NewSkipLimitSection
  • github.com/go-go-golems/glazed/pkg/settings: WithOutputParameterLayerOptions -> WithOutputSectionOptions
  • github.com/go-go-golems/glazed/pkg/settings: WithSelectParameterLayerOptions -> WithSelectSectionOptions
  • github.com/go-go-golems/glazed/pkg/settings: WithTemplateParameterLayerOptions -> WithTemplateSectionOptions
  • github.com/go-go-golems/glazed/pkg/settings: WithRenameParameterLayerOptions -> WithRenameSectionOptions
  • github.com/go-go-golems/glazed/pkg/settings: WithReplaceParameterLayerOptions -> WithReplaceSectionOptions
  • github.com/go-go-golems/glazed/pkg/settings: WithFieldsFiltersParameterLayerOptions -> WithFieldsFiltersSectionOptions
  • github.com/go-go-golems/glazed/pkg/settings: WithJqParameterLayerOptions -> WithJqSectionOptions
  • github.com/go-go-golems/glazed/pkg/settings: WithSortParameterLayerOptions -> WithSortSectionOptions
  • github.com/go-go-golems/glazed/pkg/settings: WithSkipLimitParameterLayerOptions -> WithSkipLimitSectionOptions
  • github.com/go-go-golems/glazed/pkg/settings: GlazedTemplateLayerSlug -> GlazedTemplateSectionSlug
  • github.com/go-go-golems/glazed/pkg/settings: NewSelectSettingsFromParameters -> NewSelectSettingsFromValues
  • github.com/go-go-golems/glazed/pkg/settings: NewRenameSettingsFromParameters -> NewRenameSettingsFromValues
  • github.com/go-go-golems/glazed/pkg/settings: NewReplaceSettingsFromParameters -> NewReplaceSettingsFromValues
  • github.com/go-go-golems/glazed/pkg/settings: NewJqSettingsFromParameters -> NewJqSettingsFromValues
  • github.com/go-go-golems/glazed/pkg/settings: NewSortSettingsFromParameters -> NewSortSettingsFromValues
  • github.com/go-go-golems/glazed/pkg/settings: NewSkipLimitSettingsFromParameters -> NewSkipLimitSettingsFromValues
  • github.com/go-go-golems/glazed/pkg/settings: glazedLayer -> glazedValues
  • github.com/go-go-golems/glazed/pkg/cmds: Layers -> Schema
  • github.com/go-go-golems/glazed/pkg/cmds: WithLayersList -> WithSections
  • github.com/go-go-golems/glazed/pkg/cmds: WithLayers -> WithSchema
  • github.com/go-go-golems/glazed/pkg/cmds: WithLayersMap -> WithSectionsMap
  • github.com/go-go-golems/glazed/pkg/cmds: WithReplaceLayers -> WithReplaceSections
  • github.com/go-go-golems/glazed/pkg/cmds: GetDefaultLayer -> GetDefaultSection
  • github.com/go-go-golems/glazed/pkg/cmds: GetLayer -> GetSection
  • github.com/go-go-golems/glazed/pkg/cmds: SetLayers -> SetSections
  • github.com/go-go-golems/glazed/pkg/cmds/logging: LoggingLayerSlug -> LoggingSectionSlug
  • github.com/go-go-golems/glazed/pkg/cmds/logging: NewLoggingLayer -> NewLoggingSection
  • github.com/go-go-golems/glazed/pkg/cmds/logging: AddLoggingLayerToCommand -> AddLoggingSectionToCommand
  • github.com/go-go-golems/glazed/pkg/cmds/logging: AddLoggingLayerToRootCommand -> AddLoggingSectionToRootCommand
  • github.com/go-go-golems/glazed/pkg/codegen: ParameterDefinitionToDict -> FieldDefinitionToDict
  • github.com/go-go-golems/glazed/pkg/helpers/templating: toUrlParameter -> toUrlField
  • github.com/go-go-golems/glazed/pkg/cli/cliopatra: Parameter -> Field
  • github.com/go-go-golems/glazed/pkg/cli/cliopatra: getCliopatraParameters -> getCliopatraFields

Appendix B: File renames (git diff --name-status --find-renames)

  • Format: R<score> <old> <new>
  • R100 cmd/examples/parameter-types/config.yaml cmd/examples/field-types/config.yaml
  • R100 cmd/examples/parameter-types/sample-lines.txt cmd/examples/field-types/sample-lines.txt
  • R100 cmd/examples/parameter-types/sample-list.json cmd/examples/field-types/sample-list.json
  • R067 cmd/examples/parameter-types/sample-text.txt cmd/examples/field-types/sample-text.txt
  • R100 cmd/examples/parameter-types/sample.json cmd/examples/field-types/sample.json
  • R100 cmd/examples/parameter-types/sample.yaml cmd/examples/field-types/sample.yaml
  • R100 cmd/examples/parameter-types/simple-config.yaml cmd/examples/field-types/simple-config.yaml
  • R100 misc/json-parameters-from-json.json misc/json-fields-from-json.json
  • R073 pkg/cmds/fields/parameters.go pkg/cmds/fields/definitions.go
  • R076 pkg/cmds/fields/parameters_from_defaults_test.go pkg/cmds/fields/definitions_from_defaults_test.go
  • R078 pkg/cmds/fields/parameters_test.go pkg/cmds/fields/definitions_test.go
  • R091 pkg/cmds/fields/parameter-type.go pkg/cmds/fields/field-type.go
  • R093 pkg/cmds/fields/parsed-parameter.go pkg/cmds/fields/field-value.go
  • R076 pkg/cmds/fields/gather-parameters.go pkg/cmds/fields/gather-fields.go
  • R064 pkg/cmds/fields/gather-parameters_test.go pkg/cmds/fields/gather-fields_test.go
  • R084 pkg/cmds/fields/test-data/parameters_test.yaml pkg/cmds/fields/test-data/definitions_test.yaml
  • R084 pkg/cmds/fields/test-data/parameters_validity_test.yaml pkg/cmds/fields/test-data/definitions_validity_test.yaml
  • R081 pkg/cmds/logging/layer.go pkg/cmds/logging/section.go
  • R082 pkg/cmds/schema/layer.go pkg/cmds/schema/schema.go
  • R079 pkg/cmds/schema/layer-impl.go pkg/cmds/schema/section-impl.go
  • R073 pkg/cmds/schema/layer-impl_test.go pkg/cmds/schema/section-impl_test.go
  • R074 pkg/cmds/sources/load-parameters-from-json.go pkg/cmds/sources/load-fields-from-config.go
  • R064 pkg/cmds/sources/tests/wrap-with-restricted-layers.yaml pkg/cmds/sources/tests/wrap-with-restricted-sections.yaml
  • R097 pkg/cmds/values/parsed-layer.go pkg/cmds/values/section-values.go
  • R057 pkg/cmds/values/parsed-layer_test.go pkg/cmds/values/section-values_test.go
  • R078 pkg/doc/topics/08-file-parameter-type.md pkg/doc/topics/08-file-field-type.md
  • R060 pkg/doc/topics/16-adding-parameter-types.md pkg/doc/topics/16-adding-field-types.md
  • R084 pkg/doc/topics/logging-layer.md pkg/doc/topics/logging-section.md
  • R058 pkg/doc/topics/layers-guide.md pkg/doc/topics/sections-guide.md
  • R073 pkg/doc/tutorials/custom-layer.md pkg/doc/tutorials/custom-section.md

Appendix C: Validation commands

  • rg -n -i "layer|parameter" glazed -g '!**/ttmp/**'
  • go test ./...
  • golangci-lint run -v --max-same-issues=100
  • gosec -exclude=G101,G304,G301,G306,G204 -exclude-dir=ttmp -exclude-dir=.history ./...
  • govulncheck ./...