codehost

package standard library
go1.11.11 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Overview

Package codehost defines the interface implemented by a code hosting source, along with support code for use by implementations.

Index

Constants

View Source
const (
	MaxGoMod   = 16 << 20  // maximum size of go.mod file
	MaxLICENSE = 16 << 20  // maximum size of LICENSE file
	MaxZipFile = 500 << 20 // maximum size of downloaded zip file
)

Downloaded size limits.

Variables

View Source
var WorkRoot string

WorkRoot is the root of the cached work directory. It is set by cmd/go/internal/modload.InitMod.

Functions

func AllHex

func AllHex(rev string) bool

AllHex reports whether the revision rev is entirely lower-case hexadecimal digits.

func Run

func Run(dir string, cmdline ...interface{}) ([]byte, error)

Run runs the command line in the given directory (an empty dir means the current directory). It returns the standard output and, for a non-zero exit, a *RunError indicating the command, exit status, and standard error. Standard error is unavailable for commands that exit successfully.

func RunWithStdin

func RunWithStdin(dir string, stdin io.Reader, cmdline ...interface{}) ([]byte, error)

func