sources

package
v8.23.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: MIT Imports: 12 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirectoryTargets

func DirectoryTargets(source string, s *semgroup.Group, followSymlinks bool, shouldSkip func(string) bool) (<-chan ScanTarget, error)

Types

type GitCmd

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

GitCmd helps to work with Git's output.

func NewGitDiffCmd

func NewGitDiffCmd(source string, staged bool) (*GitCmd, error)

NewGitDiffCmd returns `*DiffFilesCmd` with two channels: `<-chan *gitdiff.File` and `<-chan error`. Caller should read everything from channels until receiving a signal about their closure and call the `func (*DiffFilesCmd) Wait()` error in order to release resources.

func NewGitLogCmd

func NewGitLogCmd(source string, logOpts string) (*GitCmd, error)

NewGitLogCmd returns `*DiffFilesCmd` with two channels: `<-chan *gitdiff.File` and `<-chan error`. Caller should read everything from channels until receiving a signal about their closure and call the `func (*DiffFilesCmd) Wait()` error in order to release resources.

func (*GitCmd) DiffFilesCh

func (c *GitCmd) DiffFilesCh() <-chan *gitdiff.File

DiffFilesCh returns a channel with *gitdiff.File.

func (*GitCmd) ErrCh

func (c *GitCmd) ErrCh() <-chan error

ErrCh returns a channel that could produce an error if there is something in stderr.

func (*GitCmd) Wait

func (c *GitCmd) Wait() (err error)

Wait waits for the command to exit and waits for any copying to stdin or copying from stdout or stderr to complete.

Wait also closes underlying stdout and stderr.

type ScanTarget

type ScanTarget struct {
	Path    string
	Symlink string
}

Jump to

Keyboard shortcuts

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