cli

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run() error

Run use for run the cli app

Types

type App

type App struct {
	*cli.App
	// contains filtered or unexported fields
}

App define cli application struct

type Module

type Module struct {
	Name  string
	Path  string
	Stubs []Stub
}

Module struct

func (*Module) Create

func (m *Module) Create(rootPath string, packageName string) error

Create use for create app module

func (*Module) CreatePath

func (m *Module) CreatePath(rootPath string) (string, error)

CreatePath use for create path

type Stub

type Stub struct {
	Name string
	Path string
	File string
}

Stub struct

func (*Stub) Cast

func (s *Stub) Cast(modulePath string, replace interface{}) error

Cast use for create code file by stub

func (*Stub) GetStubContent

func (s *Stub) GetStubContent() (string, error)

GetStubContent use for Get stub file content

Jump to

Keyboard shortcuts

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