kclautomation

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package kclautomation provides functionality for automated KCL code manipulation.

This package implements operations to programmatically create, update, and manipulate KCL files. It provides a structured approach to modify KCL configuration, wrapping existing KCL automation tooling.

Index

Constants

This section is empty.

Variables

View Source
var File = &file{}

File is a concurrency-safe KCL file writer.

Functions

func SpecPathJoin

func SpecPathJoin(path ...string) string

SpecPathJoin joins path components with dots, splitting any components that already contain dots.

Types

type Automation

type Automation map[string]MapValue

Automation represents a collection of keys and their associated values for automation.

func (Automation) GetSpecs

func (a Automation) GetSpecs(specPath string) ([]string, error)

GetSpecs returns a sorted list of specs which can be passed to kcl-lang.io/kcl-go.OverrideFile.

type MapValue

type MapValue struct {
	// contains filtered or unexported fields
}

MapValue represents a value that can be either a string or a boolean.

func NewBool

func NewBool(b bool) MapValue

NewBool creates a new MapValue from a boolean.

func NewString

func NewString(s string) MapValue

NewString creates a new MapValue from a string.

func (MapValue) GetValue

func (s MapValue) GetValue() string

GetValue returns the string representation of the value.

func (MapValue) IsBool

func (s MapValue) IsBool() bool

IsBool returns true if the value is a boolean.

func (MapValue) IsString

func (s MapValue) IsString() bool

IsString returns true if the value is a string.

Jump to

Keyboard shortcuts

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