generate

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecideFileName

func DecideFileName(baseFileName, fileExtension string) string

DecideFileName appends _<i> to the base file name to find an unused file name in the current directory.

func Generate

func Generate(alias string, cnf *conf.Conf, dataMap map[string]interface{})

Generate creates a new file in the current directory, using given template data.

It names the file the same name as the current folder. However, if a file with the same name exists, it appends _<i>, where <i> is the smallest non-negative number for which no file exists.

Spaces in the file name are also replaced with underscore.

Ensure 'cnf' is local (folder) configuration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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