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

P4 API for Go Documentation | 2025.2

# Sync files to the latest revision

The following is an example of how to sync files to the latest revision using P4 API for Go.

Copy

    1
    2
    3
    4
    5
    6
    // Sync files to the latest revision
    result, err := p4api.Run("sync", "//depot/...")
    if err != nil {
        fmt.Println("Error in sync files:", err)
    }
    fmt.Println("Sync result:", result)

Your search for returned results