Documentation
¶
Overview ¶
Package initialize provides error constructors for context initialization.
Index ¶
- func ContextNotInitialized() error
- func CreateMakefile(cause error) error
- func CtxNotInPath() error
- func DetectReferenceTime(cause error) error
- func HomeDir(cause error) error
- func NotInitialized() error
- func ReadProjectReadme(dir string, cause error) error
- func ReadTemplate(name string, cause error) error
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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.