convert

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: BSD-3-Clause Imports: 9 Imported by: ? 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 convert writes a GitHub Actions workflow, in YAML, as an HCL workflow document, the native format of go-vcs (package hclwf).

The converter does not trust itself. Convert parses its own output with hclwf, builds both workflow models, and returns the HCL only when the two models are the same (an expression compared in canonical form, a position ignored). A document the HCL format cannot say, or the converter cannot write, is refused with the place and the key, never silently changed. Comments and the layout of the YAML are not carried over: they are not part of the model.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(src []byte) (out []byte, err error)

Convert returns the HCL text of the workflow in src, or the reason it cannot be written without changing what the workflow means.

Types

type Error

type Error struct {
	Line, Col int
	Msg       string
}

Error is a conversion refusal. Its text names a position and a key, never a value of the document.

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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