Documentation
¶
Index ¶
- Constants
- func Run(o Opt) error
- type Action
- type BuiltinTemplates
- type Command
- type FS
- type OSFS
- func (OSFS) CreateTemp(d, pat string) (TempFile, error)
- func (OSFS) MkdirAll(p string, m fs.FileMode) error
- func (OSFS) ReadFile(p string) ([]byte, error)
- func (OSFS) Remove(p string) error
- func (OSFS) Rename(a, b string) error
- func (OSFS) Stat(p string) (fs.FileInfo, error)
- func (OSFS) WriteFile(p string, b []byte, m fs.FileMode) error
- type Opt
- type TempFile
- type TemplateStore
Constants ¶
View Source
const ( DefaultDir = "." DefaultTemplate = "standard" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BuiltinTemplates ¶
type BuiltinTemplates struct{}
func (BuiltinTemplates) Find ¶
func (BuiltinTemplates) Find(name string) (template, bool)
func (BuiltinTemplates) List ¶
func (BuiltinTemplates) List() []template
func (BuiltinTemplates) Names ¶
func (BuiltinTemplates) Names() []string
func (BuiltinTemplates) Width ¶
func (BuiltinTemplates) Width() int
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command runs the init command with injectable dependencies.
type Opt ¶
type Opt struct {
Dir string
Template string
Force bool
DryRun bool
NoGitignore bool
List bool
Out io.Writer
}
Opt describes how the init command should run. Fields are plain values so callers can map flags directly.
Click to show internal directories.
Click to hide internal directories.