{"modulePath":"github.com/coderhaoxin/caddy","version":"v0.7.1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package gitos\n\n## Types\n\n```go\ntype Cmd interface {\n\t// Run starts the specified command and waits for it to complete.\n\tRun() error\n\n\t// Start starts the specified command but does not wait for it to complete.\n\tStart() error\n\n\t// Wait waits for the command to exit. It must have been started by Start.\n\tWait() error\n\n\t// Output runs the command and returns its standard output.\n\tOutput() ([]byte, error)\n\n\t// Dir sets the working directory of the command.\n\tDir(string)\n\n\t// Stdin sets the process's standard input.\n\tStdin(io.Reader)\n\n\t// Stdout sets the process's standard output.\n\tStdout(io.Writer)\n\n\t// Stderr sets the process's standard output.\n\tStderr(io.Writer)\n}\n```\nCmd is an abstraction for external commands (os.Cmd).\n\n```go\ntype File interface {\n\t// Name returns the name of the file\n\tName() string\n\n\t// Stat returns the FileInfo structure describing file.\n\tStat() (os.FileInfo, error)\n\n\t// Close closes the File, rendering it unusable for I/O.\n\tClose() error\n\n\t// Chmod changes the mode of the file.\n\tChmod(os.FileMode) error\n\n\t// Read reads up to len(b) bytes from the File. It returns the number of\n\t// bytes read and an error, if any.\n\tRead([]byte) (int, error)\n\n\t// Write writes len(b) bytes to the File. It returns the number of bytes\n\t// written and an error, if any.\n\tWrite([]byte) (int, error)\n}\n```\nFile is an abstraction for file (os.File).\n\n```go\ntype GitOS struct{}\n```\nGitOS is the implementation of OS for git.\n\n```go\nfunc (g GitOS) Command(name string, args ...string) Cmd\n```\nCommand calls exec.Command.\n\n```go\nfunc (g GitOS) LookPath(file string) (string, error)\n```\nLookPath calls exec.LookPath.\n\n```go\nfunc (g GitOS) Mkdir(name string, perm os.FileMode) error\n```\nMkdir calls os.Mkdir.\n\n```go\nfunc (g GitOS) MkdirAll(path string, perm os.FileMode) error\n```\nMkdirAll calls os.MkdirAll.\n\n```go\nfunc (g GitOS) NewTicker(d time.Duration) Ticker\n```\nNew Ticker calls time.NewTicker.\n\n```go\nfunc (g GitOS) ReadDir(dirname string) ([]os.FileInfo, error)\n```\nReadDir calls ioutil.ReadDir.\n\n```go\nfunc (g GitOS) Remove(name string) error\n```\nRemove calls os.Remove.\n\n```go\nfunc (g GitOS) Sleep(d time.Duration)\n```\nSleep calls time.Sleep.\n\n```go\nfunc (g GitOS) Stat(name string) (os.FileInfo, error)\n```\nStat calls os.Stat.\n\n```go\nfunc (g GitOS) TempFile(dir, prefix string) (File, error)\n```\nTempFile calls ioutil.TempFile.\n\n```go\nfunc (g GitOS) TimeSince(t time.Time) time.Duration\n```\nTimeSince calls time.Since\n\n```go\ntype GitTicker struct {\n\t*time.Ticker\n}\n```\nGitTicker is the implementation of Ticker for git.\n\n```go\nfunc (g *GitTicker) C() \u003c-chan time.Time\n```\nC returns the channel on which the ticks are delivered.s\n\n```go\ntype OS interface {\n\t// Command returns the Cmd to execute the named program with the\n\t// given arguments.\n\tCommand(string, ...string) Cmd\n\n\t// Mkdir creates a new directory with the specified name and permission\n\t// bits.\n\tMkdir(string, os.FileMode) error\n\n\t// MkdirAll creates a directory named path, along with any necessary\n\t// parents.\n\tMkdirAll(string, os.FileMode) error\n\n\t// Stat returns a FileInfo describing the named file.\n\tStat(string) (os.FileInfo, error)\n\n\t// Remove removes the named file or directory.\n\tRemove(string) error\n\n\t// ReadDir reads the directory named by dirname and returns a list of\n\t// directory entries.\n\tReadDir(string) ([]os.FileInfo, error)\n\n\t// LookPath searches for an executable binary named file in the directories\n\t// named by the PATH environment variable.\n\tLookPath(string) (string, error)\n\n\t// TempFile creates a new temporary file in the directory dir with a name\n\t// beginning with prefix, opens the file for reading and writing, and\n\t// returns the resulting File.\n\tTempFile(string, string) (File, error)\n\n\t// Sleep pauses the current goroutine for at least the duration d. A\n\t// negative or zero duration causes Sleep to return immediately.\n\tSleep(time.Duration)\n\n\t// NewTicker returns a new Ticker containing a channel that will send the\n\t// time with a period specified by the argument.\n\tNewTicker(time.Duration) Ticker\n\n\t// TimeSince returns the time elapsed since the argument.\n\tTimeSince(time.Time) time.Duration\n}\n```\nOS is an abstraction for required OS level functions.\n\n```go\ntype Ticker interface {\n\tC() \u003c-chan time.Time\n\tStop()\n}\n```\nTicker is an abstraction for Ticker (time.Ticker)\n\n","path":"github.com/coderhaoxin/caddy/middleware/git/gitos","name":"gitos","synopsis":"","isRedistributable":true}
