initialize

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package initialize provides error constructors for context initialization.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextNotInitialized

func ContextNotInitialized() error

ContextNotInitialized returns an error when no .context/ directory is found.

Returns:

  • error: "no .context/ directory found. Run 'ctx init' first"

func CreateMakefile

func CreateMakefile(cause error) error

CreateMakefile wraps a failure to create a new Makefile.

Parameters:

  • cause: the underlying OS error

Returns:

  • error: "failed to create Makefile: <cause>"

func CtxNotInPath

func CtxNotInPath() error

CtxNotInPath returns an error indicating that ctx was not found in PATH.

Returns:

  • error: "ctx not found in PATH"

func DetectReferenceTime

func DetectReferenceTime(cause error) error

DetectReferenceTime wraps a failure to detect the reference time for changes.

Parameters:

  • cause: the underlying detection error

Returns:

  • error: "detecting reference time: <cause>"

func HomeDir

func HomeDir(cause error) error

HomeDir wraps a failure to determine the home directory.

Parameters:

  • cause: the underlying OS error

Returns:

  • error: "cannot determine home directory: <cause>"

func NotInitialized

func NotInitialized() error

NotInitialized returns an error indicating ctx has not been initialized.

Returns:

  • error: "ctx: not initialized: run \"ctx init\" first"

func ReadProjectReadme

func ReadProjectReadme(dir string, cause error) error

ReadProjectReadme wraps a failure to read a project README template.

Parameters:

  • dir: directory name whose README failed to read
  • cause: the underlying error

Returns:

  • error: "failed to read <dir> README template: <cause>"

func ReadTemplate

func ReadTemplate(name string, cause error) error

ReadTemplate wraps a failure to read an init template file.

Parameters:

  • name: template filename that failed to read
  • cause: the underlying error

Returns:

  • error: "failed to read <name> template: <cause>"

Types

This section is empty.

Jump to

Keyboard shortcuts

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