Run a custom command

The following is an example of how to run a custom command using P4 API for Go.

Copy
// Run a custom P4 command
result, err := p4api.Run("files""//depot/...")
if err != nil {
    fmt.Println("Error while running custom command:", err)
    return
}
for _, item := range result {
    fmt.Println("Result:", item)
}