integration

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeCheckOutput

func NormalizeCheckOutput(output string) string

NormalizeCheckOutput applies all normalization functions to the output. This is the main function used by golden file tests to ensure consistent, environment-independent output for comparison.

func NormalizeLineEndings

func NormalizeLineEndings(output string) string

NormalizeLineEndings normalizes line endings to Unix-style (LF). This prevents golden file tests from failing due to Windows CRLF line endings. Example: "line1\r\nline2\r\n" -> "line1\nline2\n"

func NormalizePaths

func NormalizePaths(output string) string

NormalizePaths converts absolute paths to relative paths in the output. This ensures golden files work across different development environments. Example: /Users/me/dev/ckeletin-go/cmd/root.go -> ./cmd/root.go

func NormalizeTempPaths

func NormalizeTempPaths(output string) string

NormalizeTempPaths replaces temporary directory paths with placeholders. This prevents golden file tests from failing due to random temp directory names. Supports macOS, Linux, and Windows temp directory patterns.

Examples:

  • macOS: /var/folders/.../TestScaffoldInit1234567890/001 -> /tmp/TEMP_DIR/001
  • Linux: /tmp/TestScaffoldInit1234567890/001 -> /tmp/TEMP_DIR/001
  • Windows: C:\Users\...\AppData\Local\Temp\TestScaffoldInit1234567890\001 -> /tmp/TEMP_DIR/001

func NormalizeTimings

func NormalizeTimings(output string) string

NormalizeTimings replaces timing values (e.g., "1.23s") with a placeholder. This prevents golden file tests from failing due to performance variations. Handles all duration patterns including: "Completed in 12.34s", "took 45.2s", etc. Example: "Completed in 12.34s" -> "Completed in X.XXs"

Types

This section is empty.

Jump to

Keyboard shortcuts

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