cmds

package
v1.2.15 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package cmds holds commands being used for scaffolding

Index

Constants

This section is empty.

Variables

View Source
var ErrFailedToGetRleaseURL = fmt.Errorf("failed to get release URL")

ErrFailedToGetRleaseURL is returned when failed to get release URL.

Functions

func DownloadFromURL added in v1.0.0

func DownloadFromURL(name, sourceURL, archiveType, binaryName, destPath string) error

DownloadFromURL rejects downloads without integrity metadata. Use DownloadVerifiedFromURL to provide the required SHA-256 digest.

func DownloadFromURLTemplate added in v1.0.0

func DownloadFromURLTemplate(
	name,
	version,
	urlTemplate,
	archiveType,
	binaryName,
	goos,
	goarch,
	destPath string,
) error

DownloadFromURLTemplate rejects downloads without integrity metadata. Use DownloadVerifiedFromURLTemplate to provide the required SHA-256 digest.

func DownloadGoTool added in v0.37.2

func DownloadGoTool(name, module, version, goos, goarch, destPath string) error

DownloadGoTool rejects downloads without integrity metadata. Use DownloadVerifiedGoTool to provide the required SHA-256 digest.

func DownloadTailwindCLI added in v0.37.2

func DownloadTailwindCLI(version, goos, goarch, destPath string) error

DownloadTailwindCLI rejects downloads without integrity metadata. Use DownloadVerifiedTailwindCLI to provide the required SHA-256 digest.

func DownloadVerifiedFromURL added in v1.0.0

func DownloadVerifiedFromURL(name, sourceURL, archiveType, binaryName, destPath, expectedSHA256 string) error

DownloadVerifiedFromURL downloads from a URL after verifying the expected SHA-256 digest.

func DownloadVerifiedFromURLTemplate added in v1.0.0

func DownloadVerifiedFromURLTemplate(
	name,
	version,
	urlTemplate,
	archiveType,
	binaryName,
	goos,
	goarch,
	destPath,
	expectedSHA256 string,
) error

DownloadVerifiedFromURLTemplate downloads from a URL template after verifying the expected SHA-256 digest.

func DownloadVerifiedGoTool added in v1.0.0

func DownloadVerifiedGoTool(name, module, version, goos, goarch, destPath, expectedSHA256 string) error

DownloadVerifiedGoTool downloads a Go tool release asset after verifying the expected SHA-256 digest.

func DownloadVerifiedTailwindCLI added in v1.0.0

func DownloadVerifiedTailwindCLI(version, goos, goarch, destPath, expectedSHA256 string) error

DownloadVerifiedTailwindCLI downloads the Tailwind CLI after verifying the expected SHA-256 digest.

func GetPlatform added in v0.37.2

func GetPlatform() (string, string)

GetPlatform returns platform.

func RunGoFmt

func RunGoFmt(targetDir string) error

RunGoFmt runs go fmt.

func RunGoFmtPath added in v0.38.9

func RunGoFmtPath(targetDir, path string) error

RunGoFmtPath runs go fmt path.

func RunGoModTidy

func RunGoModTidy(targetDir string) error

RunGoModTidy runs go mod tidy.

func RunGolines added in v0.38.9

func RunGolines(targetDir string) error

RunGolines runs golines.

func RunGooseFix

func RunGooseFix(targetDir string) error

RunGooseFix runs goose fix.

func RunTemplFmt

func RunTemplFmt(targetDir string) error

RunTemplFmt runs templ fmt.

func RunTemplGenerate

func RunTemplGenerate(targetDir string) error

RunTemplGenerate runs templ generate.

Types

type ToolDownloader added in v0.37.2

type ToolDownloader struct {
	Name    string
	Module  string
	Version string
}

ToolDownloader represents tool downloader.

Jump to

Keyboard shortcuts

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