shared

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GitHubActionsTemplates embed.FS

Functions

func CreateDirStructure

func CreateDirStructure(basePath string, dirs []string) error

CreateDirStructure creates a list of directories

func FileExists

func FileExists(path string) bool

FileExists checks if a file exists

func RenderTemplate

func RenderTemplate(fs embed.FS, templateName string, data interface{}) ([]byte, error)

RenderTemplate renders a template from an embed.FS and returns the result as bytes

func ToCamelCase

func ToCamelCase(s string) string

ToCamelCase converts snake_case to CamelCase

func ToKebabCase

func ToKebabCase(s string) string

ToKebabCase converts snake_case or CamelCase to kebab-case

func WriteFile

func WriteFile(path string, content []byte, force bool) error

WriteFile writes content to a file, creating directories as needed

Types

type ProjectConfig

type ProjectConfig struct {
	// Project identification
	Name   string // Project name (e.g., "my-backend")
	Output string // Output directory

	// Go-specific (optional for other stacks)
	Module string // Go module path (e.g., "github.com/company/my-backend")

	// Generation options
	Force bool // Overwrite existing files

	// Metadata
	Timestamp string // Generation timestamp
}

ProjectConfig holds common configuration for all project types

Jump to

Keyboard shortcuts

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