Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateOptions ¶
type CreateOptions struct {
DryRun bool
Config config.Project
Values template.Values
Gitignore string
InitGit bool
License *license.Info
}
CreateOptions provide optional configuration for the project creator. If DryRun is set to true, actions will only be logged, but nothing will be written to the project output dir.
type Creator ¶
type Creator struct {
Filesystem afero.Fs
Options *CreateOptions
}
Creator can create new projects from project skeletons.
func NewCreator ¶
func NewCreator(options *CreateOptions) *Creator
NewCreator creates a new project creator with given options.
type SkeletonFileWriter ¶
type SkeletonFileWriter struct {
// contains filtered or unexported fields
}
SkeletonFileWriter writes skeleton files into a target directory after rendering all templates contained in them.
func NewSkeletonFileWriter ¶
func NewSkeletonFileWriter(fs afero.Fs) *SkeletonFileWriter
NewSkeletonFileWriter creates a new *SkeletonFileWriter which uses fs as the target filesystem for all files and directories that may be created.
func (*SkeletonFileWriter) WriteFiles ¶
func (fw *SkeletonFileWriter) WriteFiles(files []*skeleton.File, targetDir string, values template.Values) error
WriteFiles writes files to targetDir. The provided template values are passed to template files and template filenames before rendering them.