Documentation
¶
Overview ¶
Package p4 wraps the Perforce Helix Core command line.
It assumes p4 or p4.exe is in the PATH. It uses the p4 -G global option which returns Python marshalled dictionary objects.
p4 Python parsing module is based on: https://github.com/hambster/gopymarshal
Index ¶
- type P4
- func (p4 *P4) Run(args []string) ([]map[string]string, error)
- func (p4 *P4) RunBytes(args []string) ([]byte, error)
- func (p4 *P4) Save(specName string, specContents map[string]string, args []string) ([]map[string]string, error)
- func (p4 *P4) SaveTxt(specName string, specContents map[string]string, args []string) (string, error)
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type P4 ¶
type P4 struct {
// contains filtered or unexported fields
}
P4 - environment for P4
func NewP4Params ¶
NewP4Params - create and initialise with params
func (*P4) Save ¶
func (p4 *P4) Save(specName string, specContents map[string]string, args []string) ([]map[string]string, error)
Save - runs p4 -i for specified spec returns result
func (*P4) SaveTxt ¶ added in v0.2.3
func (p4 *P4) SaveTxt(specName string, specContents map[string]string, args []string) (string, error)
The Save() func doesn't work as it needs the data marshalled instead of map[string]string This is a quick fix, the real fix is writing a marshal() function or try using gopymarshal
Click to show internal directories.
Click to hide internal directories.