Documentation ¶
Overview ¶
You can use the "packr clean" command to clean up this, and any other packr generated files.
Index ¶
- Constants
- Variables
- func Copy(src, dst string) (int64, error)
- func CreateDirIfNotExists(dir *string)
- func Error(err error) bool
- func Exists(path string) (bool, error)
- func GenerateTemporaryFileName() (string, error)
- func GetSpringTemplate(templateName string) (string, error)
- func GetValue(cmd *cobra.Command, key string) string
- func GetValueBool(cmd *cobra.Command, key string) bool
- func GetValueInt32(cmd *cobra.Command, key string) int32
- func GetValues(cmd *cobra.Command, key string) []string
- func GitAddAll(repoPath string)
- func GitAddRemote(repoPath string, repositoryUrl string)
- func GitCommit(repoPath string, message string)
- func GitInitNewRepo(repoPath string)
- func LogAndExit(err error, exitCode int)
- func LogMessageAndExit(message string)
- func MakeHttpRequest(req *http.Request, ch chan<- ChannelResponse)
- func ParseTemplate(templateData interface{}, templateFile, templateStr string) (string, error)
- func Unzip(src string, dest string) ([]string, error)
- func ValidateRequired(value, key string)
- type ChannelResponse
- type Git
Constants ¶
View Source
const ( EnvironmentError = 1 FileNotFound = 2 InvalidTemplate = 3 ArgMissing = 4 NetworkError = 5 )
View Source
const (
JavaSpring = "java-spring"
)
Variables ¶
View Source
var ( TempDirectory string OutputDirectory string )
Functions ¶
func Copy ¶
Reference: https://opensource.com/article/18/6/copying-files-go
func CreateDirIfNotExists ¶
func CreateDirIfNotExists(dir *string)
func GetSpringTemplate ¶
func GitAddRemote ¶
func GitInitNewRepo ¶
func GitInitNewRepo(repoPath string)
func LogAndExit ¶
func LogMessageAndExit ¶
func LogMessageAndExit(message string)
func MakeHttpRequest ¶
func MakeHttpRequest(req *http.Request, ch chan<- ChannelResponse)
func ParseTemplate ¶
func Unzip ¶
Unzip will decompress a zip archive, moving all files and folders within the zip file (parameter 1) to an output directory (parameter 2). Reference https://golangcode.com/unzip-files-in-go/
func ValidateRequired ¶
func ValidateRequired(value, key string)
Types ¶
type ChannelResponse ¶
Click to show internal directories.
Click to hide internal directories.