Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 API for Go Documentation | 2025.1

# Run a custom command

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

Copy

    1
    2
    3
    4
    5
    6
    7
    8
    9
    // Run a custom P4 server 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)
    }

Your search for returned results