configgen

package
v1.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package configgen renders a CircleCI pipeline YAML from a reposcan.Result and writes it to disk. It backs `circleci config generate` and is reusable by other commands (e.g. an onboarding wrapper) that already have a scan result in hand and want to write the config without re-scanning.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(ctx context.Context, dir string, result *reposcan.Result) error

Generate writes a CircleCI pipeline config to <dir>/.circleci/config.yml from a pre-computed scan result. It marshals the pipeline YAML, creates the .circleci/ directory if missing, writes the file atomically (temp file + rename), and prints a "Generated <path>" line to stderr.

Callers are responsible for any preamble output and the "config already exists" short-circuit; Generate will overwrite an existing file.

Errors are returned as structured CLIErrors so the CLI's top-level handler can render them consistently.

func RenderWriteFailedPrompt

func RenderWriteFailedPrompt(stack, image, targetPath, errMsg string) string

RenderWriteFailedPrompt returns the POC prompt shown when writing the generated config to disk fails. The user is expected to paste this into an AI assistant to diagnose the filesystem-level cause.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL