goproject

package module
v0.0.0-...-e1bbb0e Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: MIT Imports: 12 Imported by: 0

README

go-project

Usage: go-project [command] [flag...]

Commands:

[help] : Show help and exit, default command

[init] : Create a project root directory with optional sub directories.

Flags:

[--design | -d] : File where project details are given.

Description:

init:

The init command with name will create a minimal project with only a root directory and a readme file. More functionality can be had by using a design file. See the 'example.design' file in this repository. To use init without following with a name use -- for name. If no name is given, (eg. --) then a name must appear in the design file.

--design:

The project name is the minimum requirement, but can be followed by sub directories with optional content specified for each one. Some content may include a license, a .gitignore file, or any file you want copied into the directory. External commands can be executed and nearly any structure you want can be created. A workspace and/or module can be initiated as well. The --design flag is optional, if not given the app will look for a file named 'go-project.design' in the current directory. If that is not found then the program will exit with an exit code of 2.

Documentation

Index

Constants

View Source
const (
	BlankPattern      = `^\s*$`
	CommentPattern    = `^\s*#`
	BeginPattern      = `^\s*begin-design:`
	EndPattern        = `^\s*end-design:`
	OpenPattern       = `\s*\(\s*`
	ClosePattern      = `\s*\)\s*`
	AloneClosePattern = `^\s*\)`
	ProjectPattern    = `^\s*project:`
	ExecPattern       = `^\s*exec:`
	DirPattern        = `^\s*dir:`
	NamePattern       = `^\s*name:`
	CopyPattern       = `^\s*copy:`
	GetPattern        = `^\s*get:`
	ModulePattern     = `^\s*module:`
	WorkspacePattern  = `^\s*workspace:`
	GitInitPattern    = `^\s*git-init:`
)
View Source
const (
	DefaultCfgFile = "go-project.design"
)

Variables

This section is empty.

Functions

func CopyFileStr

func CopyFileStr(dst, src string) error

func Run

func Run(writer *msg.Messenger) int

func ShowHelp

func ShowHelp(w io.Writer, command ...string)

Types

type CommandToken

type CommandToken int
const (
	CmdBegin CommandToken = iota
	CmdExec
	CmdDir
	CmdCopy
	CmdGet
	CmdModule
	CmdWorkspace
	CmdGitInit
)

Directories

Path Synopsis
cmd
go-project
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Jump to

Keyboard shortcuts

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