Documentation ¶
Index ¶
Constants ¶
const (
// ContentBINARY is the string of "application/octet-stream response headers
ContentBINARY = "application/octet-stream"
)
Variables ¶
var (
// AssetsDirectory is the path which iris saves some assets came from the internet used mostly from iris control plugin (to download the html,css,js)
AssetsDirectory = ""
)
var ( // PathSeparator is the string of os.PathSeparator PathSeparator = string(os.PathSeparator) )
Functions ¶
func MustCommand ¶
MustCommand executes a command in shell and returns it's output, it's block version. It panics on an error
Types ¶
type BufferPool ¶
type BufferPool struct {
// contains filtered or unexported fields
}
BufferPool implements a pool of bytes.Buffers in the form of a bounded channel. Pulled from the github.com/oxtoacart/bpool package (Apache licensed).
func NewBufferPool ¶
func NewBufferPool(size int) (bp *BufferPool)
NewBufferPool creates a new BufferPool bounded to the given size.
func (*BufferPool) Get ¶
func (bp *BufferPool) Get() (b *bytes.Buffer)
Get gets a Buffer from the BufferPool, or creates a new one if none are available in the pool.
func (*BufferPool) Put ¶
func (bp *BufferPool) Put(b *bytes.Buffer)
Put returns the given Buffer to the BufferPool.
type Cmd ¶
Cmd is a custom struch which 'implements' the *exec.Cmd
func CommandBuilder ¶
CommandBuilder creates a Cmd object and returns it accepts 2 parameters, one is optionally first parameter is the command (string) second variatic parameter is the argument(s) (slice of string)
the difference from the normal Command function is that you can re-use this Cmd, it doesn't execute until you call its Command function
func (*Cmd) AppendArguments ¶
AppendArguments appends the arguments to the exists
func (*Cmd) Arguments ¶
Arguments sets the command line arguments, including the command as Args[0]. If the args parameter is empty or nil, Run uses {Path}.
In typical use, both Path and args are set by calling Command.
func (*Cmd) Directory ¶
Directory sets the working directory of the command. If workingDirectory is the empty string, Run runs the command in the calling process's current directory.
func (*Cmd) ResetArguments ¶
ResetArguments resets the arguments