INNER CODE UNIT · Go

selectModuleInteractively

theopenlane/core · cmd/catalog/main.go:702

func selectModuleInteractively(modules map[string]catalog.Feature) (catalog.Feature, catalog.Price, error) {
	if len(modules) == 0 {
		return catalog.Feature{}, catalog.Price{}, ErrNoModulesAvailable
	}

	// Create sorted list for consistent ordering
	type moduleOption struct {
		name   string
		module catalog.Feature
		label  string
	}

	var options []moduleOption

	for name, module := range modules {
		label := fmt.Sprintf("%s - %s", module.DisplayName, module.Description)
		options = append(options, moduleOption{
			name:   name,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…