syncer

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRepo

func IsRepo(dirName string) bool

IsRepo returns check result, the directory whether git repository

func ListDirs

func ListDirs() (dirs []string, err error)

ListDirs returns target directories

Types

type Gitter

type Gitter struct {
	// contains filtered or unexported fields
}

Gitter is strcut

func NewGitter

func NewGitter(writer, errWriter io.Writer) *Gitter

NewGitter is constructor

func (*Gitter) Git

func (g *Gitter) Git(command, dir string, args ...string) (msg, errMsg string, err error)

Git is execute git command

func (*Gitter) IsExist

func (*Gitter) IsExist() error

IsExist is check git command

type Sync

type Sync struct {
	// TimeOut is timeout of performed command on one direcotory.
	TimeOut string

	// TargetDir is target directory regex pattern.
	TargetDir string

	// IgnoreDir is ignore sync target directory regex pattern.
	IgnoreDir string

	// Command is it command.
	Command string

	// Options is git command options.
	Options []string

	// Writer is instance
	Writer *printer.Printer

	// ConNum is concurrency level
	ConNum int

	// Gitter is instance
	Gitter *Gitter
}

Sync is struct

func (*Sync) Run

func (s *Sync) Run() (err error)

Run is execute logic

Jump to

Keyboard shortcuts

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