goblockgen

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package goblockgen turns captured go blocks into normal generated Go package source used by build and app generation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratedImportPath

func GeneratedImportPath(packageName string) string

GeneratedImportPath returns the generated-app import path for go blocks from a GOWDK package.

func GeneratedRelPath

func GeneratedRelPath(packageName string) string

GeneratedRelPath returns the generated app relative path for one go block file.

func ImportAliases

func ImportAliases(file *ast.File, imports []manifest.Import) map[string]string

ImportAliases returns Go import aliases from block-local imports plus used .gwdk imports.

func ParseFile

func ParseFile(packageName string, block manifest.GoBlock) (*ast.File, error)

ParseFile parses one go block as a normal Go file in packageName.

func SafePackageDir

func SafePackageDir(packageName string) string

SafePackageDir returns a stable generated directory name for a GOWDK package.

func SafePackageName

func SafePackageName(packageName string) string

SafePackageName returns a valid Go package identifier for generated go block files.

func Source

func Source(packageName string, imports []manifest.Import, blocks []manifest.GoBlock) ([]byte, error)

Source emits one formatted Go source file containing the selected go blocks.

Types

This section is empty.

Jump to

Keyboard shortcuts

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