instructions

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GitExample = "git-example"

	GitAdd      = "git-add"
	GitCheckout = "git-checkout"
	GitClone    = "git-clone"
	GitCommit   = "git-commit"
	GitConfig   = "git-config"
	GitFetch    = "git-fetch"
	GitInit     = "git-init"
	GitPull     = "git-pull"
	GitPush     = "git-push"
	GitStatus   = "git-status"
)

定义标准的git命令名称

Variables

This section is empty.

Functions

This section is empty.

Types

type Meta

type Meta struct {
	Context context.Context
	Name    string   // the command name
	WD      afs.Path // Working Directory
}

Meta 包含git-command-object 的基本字段

type Service

type Service interface {
	Name() string // return command name
}

Service is the Runner for Command

type ServiceManager

type ServiceManager interface {
	Find(name string) (Service, error)
}

ServiceManager 用来管理已注册的服务

type ServiceRegistration

type ServiceRegistration struct {
	Name    string
	Service Service
}

ServiceRegistration ...

type ServiceRegistry

type ServiceRegistry interface {
	ListRegistrations() []*ServiceRegistration
}

ServiceRegistry ... [inject:".git-instruction-registry"]

type Task

type Task interface {
	GetMeta() *Meta
	Run() error
}

Task 接口表示git-command-object 的外观

Jump to

Keyboard shortcuts

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