owl

package module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2022 License: MIT Imports: 14 Imported by: 1

README

Owl

Owl is a Go library to create project generators for any framework or language. This is a personal project that you can use. There is no warranty if you have an error or bug publish an issue or make a pull request to improve this library.

Owl logo

Features

Owl is a template based library, what it means? It copy a template and then run init scripts that resides in that template.

  • Config file can be writed in json, yaml, toml thanks to Viper
  • Copy a local template
  • Run preconfigured template scripts
  • Copy a remote template
  • Ignore specific files with .owlignore file

Installation

go get -u github.com/4strodev/owl@latest

Visit docs

owl-docs

Thanks to

@spf13

Documentation

Index

Constants

View Source
const (
	// Permission MODES
	DIR_MODE  int = 0755
	FILE_MODE int = 0755

	// FS errors
	DIR_EXISTS          string = "Directory exists"
	TEMPLATE_NOT_PASSED string = "No template passed"
	TEMPLATE_NOT_FOUND  string = "No template found"

	CONFIG_FILE_NAME string = "owl_config"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Project

type Project struct {
	Config ProjectConfig
	// contains filtered or unexported fields
}

Contains the config the fs api and template info

func NewProject

func NewProject(projectConfig ProjectConfig, templateConfig template.TemplateConfig) *Project

Generates a new projects giving the project config and and a template config

func (*Project) Create

func (self *Project) Create() error

Create the instantiated project

func (*Project) CreateRootFolder

func (self *Project) CreateRootFolder(path string) error

Create the root folder of the project

func (Project) MountTemplate added in v0.1.4

func (self Project) MountTemplate()

type ProjectConfig

type ProjectConfig struct {
	Name               string
	TemplateName       string
	LocalTemplatesDirs []string
	VerboseOutput      bool
	TempDir            string
	// contains filtered or unexported fields
}

Contains the project's config

Directories

Path Synopsis
example_template
internal
fs

Jump to

Keyboard shortcuts

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