Skip to content

Struct tag field to link to modules #12

@exavolt

Description

@exavolt

Currently, it goes something like

type Config struct {
  OneModuleToUse string
  Modules map[string]Module
}

Currently, we need to provide the modules through descriptor. It should be possible to declare the modules in OneModuleToUse. The loader and docgen will then resolve it automatically.

type Config struct {
  OneModuleToUse string `env:"ONE_MODULE_TO_USE,oneof=Modules"` // for this field, we'll refer to the field Modules
  Modules map[string]Module
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions