skeleton

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package skeleton contains types that define the structure of a skeleton and its config. It also provides helpers to find, create and merge skeletons.

Index

Constants

This section is empty.

Variables

View Source
var ErrDirNotFound = errors.New("skeleton dir not found")

ErrDirNotFound indicates that a skeleton directory was not found.

Functions

func Create

func Create(path string) error

Create creates a new skeleton at path. The created skeleton contains an example .kickoff.yaml and example README.md.skel as starter. Returns an error if creating path or writing any of the files fails.

func FindSkeletonDir

func FindSkeletonDir(path string) (string, error)

FindSkeletonDir finds the skeleton dir path resides in. It walk up the filesystem tree and checks for each parent if it is a skeleton dir and returns its path if the check was successful. Returns ErrDirNotFound if path does not reside within a skeleton dir or one of its subdirectories. Returns any other errors that may occur while traversing the filesystem tree.

func IsInsideSkeletonDir

func IsInsideSkeletonDir(path string) (bool, error)

IsInsideSkeletonDir returns true if path is inside a skeleton dir. If path is a skeleton dir itself, this will return false.

func IsSkeletonDir

func IsSkeletonDir(dir string) (bool, error)

IsSkeletonDir returns true if dir is a skeleton dir. Skeleton dirs are detected by the fact that they contain a .kickoff.yaml file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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